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 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Selling a product through an electronic medium is
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Who can provide you with a new password when you have forgotten your old one? your provide you with a new password in case you forget your old one.
Answers: 3
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
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
Social Studies, 10.02.2021 04:10
question
Mathematics, 10.02.2021 04:10
question
Mathematics, 10.02.2021 04:10
Questions on the website: 13722367