Table of Contents
show
A histogram is a graphical representation that organizes a group of data points
Program
def hist_gram(a):
for i in a:
sum = " "
while(i > 0):
sum = sum + "$"
i = i - 1
print(sum)
n = int(input("Enter number of elements:"))
list1=[]
print("Enter elements:")
for i in range(0,n):
list1.append(int(input()))
hist_gram(list1)
Output
Enter number of elements:4
Enter elements:
1
2
3
4
$
$$
$$$
$$$$
Views: 0