I have an exercise in which I am asked to create a "Histogram" from the data entered by keyboard and stored in a python list.
For example, I enter some numbers by keyboard and add them to a python list: lista[4, 9, 7]
. The prompt should show me the following:
****
*********
*******
At the moment I have made this code, but I do not know what it fails:
lista=[]
v=0
def procedimiento(num):
for i in range(num):
print("*",end=" ")
while v!=4:
num=int(input("Introduce num astericos para histograma: "))
lista.append(num)
v=v+1
procedimiento(num)
Thanks in advance