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 13:00
We as humans write math expression in infix notation, e.g. 5 + 2 (the operators are written in-between the operands). in a computer’s language, however, it is preferred to have the operators on the right side of the operands, i.e. 5 2 +. for more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix.write a program that takes an “infix” expression as input, uses stacks to convert it into postfix expression, and finally evaluates it. it must support the following operations: + - / * ^ % (example infix expression: (7 - 3) / (2 + 2)postfix expression: 7 3 - 2 2 + /result: 1guidelines: 1. you will need to use stacks in three placesa. one for the parenthesis check [char stack]b. one during infix to postfix [char stack]c. one during evaluation [int stack]for a and b above, you can use same array and same push, pop method as both ofthem are char. but for evaluation you have int stack and you might consider to createanother push pop method to handle it. maybe push_int, pop_int, etc. or find otherstrategy to utilize existing push pop method2. you can create a function for obtaining operator priority. that function should take anoperator as input and return its priority as an integer. this function will you a lot andreduce repeated code3. during evaluation you will need to convert char into integer. example for single digit: char c = '5'; int x = c - '0';
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
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
Questions on the website: 13722361