Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Use Python Programming Language Please Use Python Programming Language EXERCISE 13: SKETCHY COUNTER . Write a program that counts from 0 to 20 that
Please Use Python Programming Language
Please Use Python Programming Language
EXERCISE 13: SKETCHY COUNTER . Write a program that counts from 0 to 20 that follows the logic below The count(er) is incremented in sub-sequent iterations, starting from iteration 0 . In each iteration Print which iteration is being run; iterations increment by 1 all the times . Generate a random positive number between 0 and 10 to be used to increment the counter . Print the increment value; do not increment the counter yet If the increment is >10 then Print the alert message " the increment is too large, ending the program" End the program, without incrementing the counter If the increment value is > 3 then . Do not increment the counter . Print the message "Don't like the increment; let's try this again" . Restart from the increment generation Increment the counter and print its value to screen Stop if the counter is >= 20 or 20 iterations have run, and prints the counter final stafeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started