subject

Write a program that will ask a user for how many numbers they would like to check. Then, using a for loop, prompt the user for a number, and output if that number is even or odd. Benchmark:

Prompt the user to answer the question, "How many numbers do you need to check?"

Create and initialize two count variables - one for odd and one for even.

Based on the previous input, create a for loop that will run that exact number of times.

Prompt the user to "Enter number: "

If that number is even, output "[number] is an even number."

Update the even count variable.

Or else if the number is odd, output "[number] is an odd number."

Update the odd count variable.

Output "You entered [number] even number(s)."

Output "You entered [number] odd number(s)."

Please write the code in the Python language.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Create a cell reference in a formula by typing in the cell name or         a. right-clicking the cell. b. clicking the cell. c. clicking the column where the cell is located. d. clicking the row where the cell is located.
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Who can provide you with a new password when you have forgotten your old one? your provide you with a new password in case you forget your old one.
Answers: 3
question
Computers and Technology, 23.06.2019 21:20
For positive constants a and b, the force between two atoms in a molecule is given f(r) = −a r2 + b r3 , where r > 0 is the distance between the atoms. note: a and b are upper case letters. (a) find f '(r) = (b) find the critical point for f(r). r = (c) find f ''(r) = (d) find the value of r so that f ''(r) = 0.
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
Answers: 1
You know the right answer?
Write a program that will ask a user for how many numbers they would like to check. Then, using a fo...
Questions
question
Mathematics, 29.04.2021 19:50
question
Mathematics, 29.04.2021 19:50
question
Mathematics, 29.04.2021 19:50
question
English, 29.04.2021 19:50
question
Mathematics, 29.04.2021 19:50
question
History, 29.04.2021 19:50