Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this program in python 3 can someone please help me thank you. Here is a nested loop example that graphically depicts

I need help with this program in python 3 can someone please help me thank you.

Here is a nested loop example that graphically depicts an integer's magnitude by using asterisks, creating what is commonly called a histogram: Run the program below and observe the output. Modify the program to print one asterisk per 5 units. So if the user enters 40, print 8 asterisks.

num = 0 while num >= 0: num = int(input('Enter an integer (negative to quit): '))

if num >= 0: print('Depicted graphically:') for i in range(num): print('*', end=' ') print(' ')

print('Goodbye.')

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

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago