Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 stafe

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

a neglect of quality in relationship to international competitors;

Answered: 1 week ago