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, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
question
Computers and Technology, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Multiple choice project create a program with two multiple choice questions. 1. users have two attempts only, show attempt number each time. hint: while loop with break control. (20%) 2. only one correct answer for each question, use switch case for each question. (20%) 3. show total score after the two questions are answered. hint: . (20%) 4. user have options to answer the two questions again if first attempt score is not 100%. hint: if statment. (20%) 5. use string method .toupper() to allow users to enter with lowercase or uppercase letters. (20%) 1. where is the capital of the state of florida? a. orlando b. tallahassee c. miami d. tampa b 2. where is walt disney world park located in florida? a. orlando b. tallahassee c. miami d. tampa a
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
English, 27.04.2021 01:00
Questions on the website: 13722359