subject

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):\n'))
if num >= 0:
print('Depicted graphically:')
for i in range(num):
print('*', end=' ')
print('\n')
print('Goodbye.')

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:40
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
question
Computers and Technology, 22.06.2019 22:50
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
You know the right answer?
I need help with this program in python 3 can someone please help me thank you. Here is a nested lo...
Questions
question
Physics, 16.01.2021 23:00
question
Mathematics, 16.01.2021 23:00
question
Mathematics, 16.01.2021 23:00
question
Mathematics, 16.01.2021 23:00
question
English, 16.01.2021 23:00
question
Mathematics, 16.01.2021 23:10
Questions on the website: 13722361