Assignment 4: Evens and Odds

Assignment 4: Evens And Odds
Assignment 4: Evens And Odds

Answers

Answer 1

n = int(input("How many numbers do you need to check? "))

even = 0

odd = 0

for x in range(n):

   num = int(input("Enter number: "))

   if num % 2 == 0:

       print(str(num) + " is an even number.")

       even += 1

   else:

       print(str(num) + " is an odd number.")

       odd += 1

print("You entered "+str(even)+" even number(s).")

print("You entered "+str(odd)+" odd number(s).")

This works for me. Best of luck.

Answer 2

The program checks if user supplied integers are even or odd and displays the appropriate value. The program is written thus in python 3 ;

n_check = int(input("How many numbers do you need to check? "))

#number of values user wishes to test

even_count = 0

odd_counts = 0

for n in range(n_check):

num = int(input("Enter number: "))

if num % 2 == 0:

#even numbers leave no remainder when divided by 2

print(str(num) + " is an even number.")

even_counts+= 1

#increase count of even numbers

else:

print(str(num) + " is an odd number.")

odd_counts += 1

print("You entered "+str(even_counts)+" even number(s).")

print("You entered "+str(odd_counts)+" odd number(s).")

#display the number of even and odd numbers entered.

Learn more : https://brainly.com/question/24171161


Related Questions

I need help pleaseeee

Answers

Answer:

The Answer is C. Hope you get it right, Good Luck!!!

Answer:

The answer is B

Explanation:

To create a list, paragraph, or unordered list, you should use HTML code, whereas in CSS coding, you can change the overall font size of a tag using the font-size=(number) tag.

In a science study group, Leonardo explains how atoms make up molecules. Talia repeats what Leonardo says in her own words. How is Talia practicing active listening? She is reflecting on what has been said. She is politely disagreeing with Leonardo. She is asking Leonardo a lot of questions. She is focused on only important information.

Answers

Answer:

A she is reflecting on what leonardo said but in her own words

Explanation:

Answer:

A: She is reflecting on what has been said.

Explanation:

Edge 2020

Identify an advantage of writing HTML code manually.

You do not have to learn HTML.

You can figure out how the markup affects the function of the site.

You can see rendered HTML as you go.​

Answers

Answer:

1. You retain 100% control over your site and where it is hosted

2. Free WYSIWYG sites aren’t really free

3. You make yourself seem irrelevant to clients

4. You understand your own code

5. Your own code is nearly always more efficient

6. Your own code is more secure

7. It’s easier to iterate your own code

8. Your own code is original

9. Writing your own code helps you grow as a developer

Explanation:

You can choose the points you want. let me know if you need any further information.☺️

Please rate if you happy

Brailliest if you want

Answer:

B. You can figure out how the markup affects the function of the site.

Explanation:

its the correct answer :)

CSS is a language that controls the way content on a web site appears. It uses_______ _____to
change the look of a page.

Answers

Answer:

I'm not sure what the answers are, but when someone is making a website from scratch, they tend to use CSS HTML and JS(javascript)

hope i helped ;)

Select all the lines that have a slope of 5/2

Answers

Answer:

Add a picture, then ask the question again.

Who you think is better? Ninja or TFue ,btw do you know who icebear is?

Answers

Answer:

no, no i dont think i will.

Explanation:

Need answer Asap!!!! Which file type is the best choice if the image will be made into a billboard?

Answers

Answer:

A .psd file

Explanation:

Adobe photoshop files are always going to be same and there is no compression. Even better .ai files are saved into equations so you can't alter or dumb it down.

Which term means an unsecure protocol used when remotely accessing a computer?

Transmission Control Protocol (TCP)
Secure Shell (SSH)
Telnet
Internet Protocol (IP)

Answers

Answer:

9Internet Protocol (IP)

Answer:

The answer is Secure Shell (SSH)

Jon wants to set up a trihomed DMZ. Which is the best method to do so? A. use dual firewalls B. use a single firewall with only two interfaces C. use a single three-legged firewall with three interfaces D. use dual firewalls with three interfaces

Answers

Answer:

The correct option is C) Use a single three-legged firewall with three interfaces

Explanation:

DMZ is an acronym for a demilitarized zone.

A DMZ network is one is situated between the internal network and the Internet. It is supported by an Internet Security and Acceleration (ISA) server.

The interfaces you'd get with the DMZ network are

A public network (Internet Protocol-IP) address  with a public interfaceAn internal network interface with a private network (IP) address  A DMZ interface with a public network (IP) address  

Unlike the back-to-back DMZ settings, a trihomed DMZ is unable to use private IP addresses. To use the trihomed DMZ, public IP addresses are a must suitable requirement.

Cheers!

Justify the use of an e-diary in the organisation of the meeting.

Answers

Answer:

It can be used to easily organize stuff

Explanation: It can be easily used to organize meetings & write important stuff, and you will also never run out of pages, which is better than having no diary.

¿En cuales situaciones concretas se puede aplicar las técnicas de conteo(particularmente las permutuaciones y las combinaciones) dentro de la informática?

Answers

Answer:

In which specific situations can counting techniques (particularly permutuations and combinations) be applied within computer science? for anybody trying to help

Select the correct answer from the drop-down menu.
Chrissie shirks the additional work given to her.
She lacks the trait of

Answers

Answer:

Responsibility

Explanation:

If you're driving a car and know there's a motorcyclist around you, you should______. A. Not change your driving B. Check your blind spots frequently C. Remind them to wear a helmet D. Make wider turns than normal

Answers

b check your blind spots frequently i guess not sure

What are the characteristics of calendar sharing options in Outlook 2016? Check all that apply.

Answers

Answer:

a,b,c,e

Explanation:

Answer:

Quit your bickering in the replies on the other answer, this is correct.

Explanation:

HELP!!!!!
Your colleague has made a suggested change to an important document you are both working on. You disagree with their suggested change. They will be reviewing the changes you make before the final version of the document is submitted to your boss. You both work remotely and are in radically different time zones. What is the best step to take next?

Answers

Leave the room and let someone else figure it out!

ABC IF U HAVE A LEGENDARY PET ON ADOPT ME OR ANYTHING COOL!! <3

Answers

Answer:

ABC PLEASE

Explanation:

Answer:

ABC i have mega owl and neon cow and mega frost <3

"prevention is better than cure" Justify this statment.​

Answers

Answer:

Hope

you like it and helpful

Which of the following expressions shows the correct amount of sales tax for the computer at Store A? Select all that apply.
6%($1,200)
0.6($1,200)
0.06($1,200)
One-sixth($1,200)
StartFraction 3 over 50 EndFraction($1,200)

Answers

Answer:

6%($1,200)  0.06($1,200)  3/50($1,200)

Explanation:

hope this helps sorry if i am wrong

have a nice day

Answer:

a,c,e

Explanation:

it just makes sense U^U

Stay at least _____ behind the vehicle ahead of you at all times.
A. 3 seconds
B. 4 seconds
C. 3 car lengths
D. 4 car lengths

Answers

Answer:

B 4 seconds

Explanation:

You should stay 4 seconds away from a vehicle at all times at the same speed as the other vehicle or vehicles.

B
You should stay 4 seconds away from a car

A collection of computers, printers, routers, switches, and other devices
that can communicate with each other over some transmission medium
O network
O host part
subnet part
subnet

Answers

ermano envia foto de lo que necesitas yo te ayudo

how to take a pic with a cumputer

Answers

Answer:

Ctrl+Shift+4

Explanation:

Answer:

Use Snip+Sketch on your taskbar

It looks like this~

can anyone answer this ​

Answers

Answer:

I dont see the question

Explanation:

Any application that wants to be displayed on the web must use the HTTP protocol
True
False

Answers

Answer:

true

Explanation:

The Quick Access tool bar allows you to customize the actions or commands you frequently use.

True
False

Answers

I believe its true.

While an image is still being editing, it is best to save it as a PDF. Group of answer choices True False

Answers

Answer:

f

Explanation:

No because when you save it, the new editing will not count.

Seneca has just applied conditional formatting and realizes that she has made a mistake. Which action should she take to fix the mistake?

A) Clear the rule she created by going to the Conditional Formatting Rules Manager dialog box and deleting the rule.
B) Clear all rules that have been applied to the worksheet or selected range by clicking the Clear Rules button.
C) Use the Undo button or Ctrl+Z.
D) Right-click the area where the conditional formatting rule has been applied, and select Clear Rule from the menu list.

Answers

Answer:

its b

Explanation:

on edg

Answer:

b

Explanation:

50 PTS
in Java
Write a program with a method called passwordCheck to return if the string is a valid password. The method should have the signature shown in the starter code.

The password must be at least 8 characters long and may only consist of letters and digits. To pass the autograder, you will need to print the boolean return value from the passwordCheck method.

Hint: Consider creating a String that contains all the letters in the alphabet and a String that contains all digits. If the password has a character that isn’t in one of those Strings, then it’s an illegitimate password!

Answers

import java.util.Scanner;

public class JavaApplication46 {

   public static boolean passwordCheck(String pass){

       String alphanum = "abcdefghijklmnopqrstuvwxyz1234567890";

       boolean legit = true;

       if (pass.length()>= 8){

           for(int i = 0; i < pass.length(); i++){

               if (alphanum.indexOf(pass.charAt(i)) != -1 && legit != false){

                   legit = true;

               }

               else{

                   legit = false;

               }

           }

       }

       else{

           legit = false;

       }

       

           return legit;

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter a password: ");

       String password = scan.next();

       System.out.println(passwordCheck(password));

   }

   

}

I hope this helps!

Which kind of a person will you be if you prove to be accountable for your actions?

Answers

Answer: You would be a person of integrity.

Explanation: Look up Integrity for details.

Which of the following is true of functions? * 2 points A. Programs written with functions run more quickly B. Functions can help remove repeated code from a program C. Replacing repeated code with a function will reduce the number of commands the computer needs to run D. Functions are called once but can be declared many times

Answers

Answer:

I’m sure if I remember that this is “B.”

Explanation:

I have taken computer science class before so I remembered!

The option that is true of functions is B. Functions can help remove repeated code from a program.

It should be noted that the fact that programs are written with functions doesn't mean that they will run quickly.

Functions can help remove repeated code from a program. Also, replacing repeated code with a function doesn't reduce the number of commands the computer needs to run.

Read related link on:

https://brainly.com/question/17691320

Which component in a CPU is responsible for transferring
data from one functional component to another?​

Answers

The data bus carries data from components to others
Other Questions
Guys please help I'm being timed What is a mixed econemy X^3 = 1000 for math please help there is a ratio of 7 boys to every 4 girls. If there are 64s, how many boys are in the school? Which is correct100 points!! Need answer for this please. Whats the mood of monkeys paw ? Need Answer ASAP ONLY 5 min. The equations are not balanced. Which equation would have the same coefficients in the same order as 2CO2 + 3H20 C2H6O + 3O2? A rubber duck has been tossed overboard off the coast of Peru. Describe his journey BACK to Peru, including the direction of the ocean currents, the movement of the water due to the Coriolis Effect, and the various climates encountered. You would like to invest $24,000 and have a portfolio expected return of 11.5 percent. You are considering two securities, A and B. Stock A has an expected return of 18.6 percent and B has an expected return of 7.4 percent. Approximately how much should you invest in Stock A if you invest the balance in Stock B? a) $7,137 b) $7,411 c) $8,786 d) $8,626 e) $7,807 PLSSSS HELPPP What effects do mutations have? Check all that apply.A) could change protein shapeB)never change protein shapeC)might be neutralD)always change the way a trait is observed E)might be harmfulF)might be beneficial y-2=-(x-7) slope intercept form What is the amplitude of y = -8sin(3x)? URGENT PLEASE HELPDrag the tiles to the correct boxes to complete the pairs. Not all tiles will be used Match the words with their definitions whats the simflied for 6x-2(3x-4) 1. State and explain your factors of production A three-phase motor rated 25 hp, 480 V, operates with a power factor of 0.74 lagging and supplies the rated load. The motor efficiency is 96%. Calculate the motor input power, reactive power and current. Sally conducts an experiment measuring plant growth. She finds that after two weeks, a plant that receives water grew 4 cm, but the plant that received soda died. What is the term for what is being measured? A rectangular lawn 4m by 10m has a garden of uniform width added to one end. Then, along the combined side length of the lawn and garden , another garden is added, whose width is twice that of garden . The total area of the lawn and both gardens is 72 m2