In: Computer Science
Write an error-free Python program to do the following things.
Sample output:
Enter population for state 1: 5
Enter population for state 2: 4.5
Enter population for state 3: 3
Enter population for state 4: 7
Enter population for state 5: 6
Enter population for state 6: 2
[5.0, 4.5, 3.0, 7.0, 6.0, 2.0]
Display of list values
* * * * * 5.0
* * * * 4.5
* * * 3.0
* * * * * * * 7.0
* * * * * * 6.0
* * 2.0
Here is the code and output

Code for copying(please check for indentation)
t=1
list1=[]
while t<7:
n=float(input("Enter population for state {} :
".format(t)))
list1.append(n)
t+=1
print(list1)
for i in list1:
print("* "*int(i)+"{}".format(i))