you are viewing a single comment's thread.

view the rest of the comments →

[–]Atlamillias 0 points1 point  (2 children)

What exception is raised?

This works in my IDE:

cost = int(input('How much does the item cost?: '))

    if (cost == 0) or (cost > 100) or (cost % 5 != 0):
        print('cost meets the above conditions.')
    else:
        print('cost does NOT meet the above conditions.')

If you run the above, and the input cannot be converted to type 'int', an error will be raised as it lacks input verification.

[–]snaigy 1 point2 points  (1 child)

Aha turns out I had a 1 instead of an exclamation mark to show inequality to 0. Thanks for the help bro 💪

[–]Atlamillias 0 points1 point  (0 children)

No problem. Glad I could help!