Question
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
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