The last part of the Python Problem asks if no number is a multiple of 0.2, it should print, "none are a multiple of 0.2."
From what I understand, I need to ask the user to input the numbers and then for each number, do a for loop to determine if it is divisible by 0.2. Then, if it isn't, put it in another list. Then, print the last number of the second list. If nothing in that list, print "none are a multiple of 0.2." I will list the code I have so far. Any help would be appreciated!
a = input("Enter first decimal number : ")
b = input("Enter second decimal number : ")
c = input("Enter third decimal number : ")
d = input("Enter fourth decimal number : ")
e = input("Enter fifth decimal number : ")
f= type(list)
print(list(a,b,c,d,e))
Aucun commentaire:
Enregistrer un commentaire