Computers and Technology
Computers and Technology, 07.01.2021 04:10, ecat1214

I NEED PYTHON PROGRAMMING HELP! 1. Prompt the user for a number from 1 to 100. Using a while loop, if they enter an invalid number, tell them the number entered is invalid and then prompt them again for a number from 1 to 100. If they enter a valid number, thank them for their input.
Prompt the user for a number from 1 to 100.
While that number is less than 1 or that number is more than 100:
Output that they entered an invalid number, and
Prompt them again for a number from 1 to 100.
Output to the user, thanking them for their input.
2. Prompt the user to guess your favorite color. Using a while loop, if the user didn't guess your favorite color [pick one for this activity] then tell them they are incorrect, then ask them again. Whenever they guess the color correctly, output that they are correct and how many guesses it took them.
Create a variable and assign it the value of 1.
Prompt the user to guess your favorite color.
While their guess is not equal to your favorite color:
Tell them they are incorrect.
Prompt them to guess again.
Add one to the variable above.
Output to the user that they were correct and how many attempts it took, using the variable.
3. Ask the user how many numbers they want to add. Using a for loop, prompt the user to enter that many numbers, one by one, keeping track of the sum. At the end, after the user has entered all numbers, output the sum.
Create a variable and assign it the value of 0.
Prompt the user for how many numbers they want to use.
With a for loop, set it to repeat enough times to get all their values.
Prompt the user for a number.
Add that number to the variable that started as 0.
Output to the user the sum of all values entered.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 16:30, rileysndr1782
Monica and her team have implemented is successfully in an organization. what factor leads to successful is implementation? good between different departments in an organization leads to successful is implementation.
Answers: 1
image
Computers and Technology, 23.06.2019 23:00, minosmora01
How do you know if the website is secure if you make a purchase
Answers: 2
image
Computers and Technology, 24.06.2019 04:30, LouieHBK
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, lakenyagillard79
Python. primary u. s. interstate highways are numbered 1-99. odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. thus, the 405 services the 5, and the 290 services the 90. given a highway number, indicate whether it is a primary or auxiliary highway. if auxiliary, indicate what primary highway it serves. also indicate if the (primary) highway runs north/south or east/west.
Answers: 1
Do you know the correct answer?
I NEED PYTHON PROGRAMMING HELP! 1. Prompt the user for a number from 1 to 100. Using a while loop,...

Questions in other subjects: