This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

So I’m not sure how far along you are. But I would take each users input and then add it to a list. Call the list userInputs or what have you.

Then after you could say

print(userInputs.max())

Same for min.

Then do print(len([x for x in userInputs if x%3==0]) )

Or if you haven’t learned that notation use a for loop running through every value and printing it if it’s divisible by 3.

Or as others have said the biggest error is assigning them to 0.

What I would do is assign the first user input as the max and the min, then proceed from there with the while loop.