subject

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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
question
Computers and Technology, 24.06.2019 15:00
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
You know the right answer?
I NEED PYTHON PROGRAMMING HELP! 1. Prompt the user for a number from 1 to 100. Using a while loop,...
Questions
question
Spanish, 22.05.2020 01:01
Questions on the website: 13722362