Question: i need a code written in python using a for loop. try to write it using simple functions - Write a program that continues to

- Write a program that continues to ask a user to input numbers until their sum equals 100. - The input statement should keep track of the try #(#1,#2,, etc.) - The program also suggests a number to the user that could end the program. - When the sum equals 100 the program exits and congratulates the user. - After 5 unsuccessful tries the program exits and tells the user that they have failed. Your output should look like so: The program will end as soon as the sum of input numbers reaches 100 Input the following number to end the program: 100 Please input #1:45 Input the following number to end the program: 55 Please input #2:55 Congratulations you have succeeded For Loop_Task 7.pdf Wnload 8.1 For Loop_Task 7.pdf (126KB) STOUT Task 7 Your output should look like so: The program will end as soon as the sum of input numbers reaches 100 Input the following number to end the program: 100 Please input \#1: 45 Input the following number to end the program: 55 Please input \#2: 56 Input the following number to end the program: 1 Please input \#3: 78 Input the following number to end the program: 79 Please input \#4:: 59 Input the following number to end the program: 20 Please input \#5: 100 Sorry! You have failed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
