I want to make a program to sort lists with numbers in ascending order with values between 1 and 100. This is what I did and if you run the code the list prints multiple times and doesn't point out the errors correctly:
# This is the user input
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
c = int(input("Enter the third number: "))
d = int(input("Enter the fourth number: "))
e = int(input("Enter the fifth number: "))
f = int(input("Enter the sixth number: "))
# This the list to sort
array = [a, b, c, d, e, f]
#This will count how many time each value is repeated
aa = int(array.count(a))
bb = int(array.count(b))
cc = int(array.count(c))
dd = int(array.count(d))
ee = int(array.count(e))
ff = int(array.count(f))
# This will loop through the list
for i in array:
# This is checking if any values are repeated or not between 1 and 100
if i > 100 or i < 1 or aa and bb and cc and dd and ee and ff > 1:
print("Number should be smaller than 100 and larger than 1 and numbers can't be repeated")
# This is to print the sorted list if you get everything right
else:
array.sort()
print(array)