subject

Use Python for the problems below. Please be sure to include documentation in the form of comments throughout. Create a program called, MoreLoops, and add any necessary heading comments. Then write the code necessary in order to meet the criteria listed below for each loop.1. Prompt the user for a number from 1 to 100. Using a while loop, if they entered 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 100While that number is less than 1 or that number is more than 100Output that they entered an invalid numberPrompt them again for a number from 1 to 100Output to the user, thanking them for their input2. 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 1Prompt the user to guess your favorite colorWhile their guess is not equal to your favorite colorTell them they are incorrectPrompt them to guess againAdd one to the variable aboveOutput to the user, they were correct and how many attempts it took using the variable3. Ask the user how many numbers for which they want to calculate the sum. 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 entered all numbers, output the sum. Create a variable and assign it the value of 0Prompt the user for how many numbers they haveWith a for loop, set it to repeat enough times to get all their valuesPrompt the user for a numberAdd that number to the variable that started as 0Output to the user, the sum of all values

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
You know the right answer?
Use Python for the problems below. Please be sure to include documentation in the form of comments t...
Questions
question
Mathematics, 24.06.2019 19:30
question
Mathematics, 24.06.2019 19:30
question
Mathematics, 24.06.2019 19:30
Questions on the website: 13722363