Python, hidden test doesn't work | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Python, hidden test doesn't work

Write a program, which will take your money and price of one ice cream and print your left money only if you can buy ice cream for your 10 friends Don't print anything if money >100 My attempt: money = int(input()) price = int(input()) if money <=100 and money > 0: if price > 0: if money - (10*price) >= 0: print(money - (10*price))

3rd Nov 2020, 1:37 PM
Миша Ловчицкий
1 Respuesta
+ 1
I had problems with this too and, if I remember rightly, it was because the problem was very poorly explained. The line “Don’t print anything if money > 100” should read “Don’t print anything if the remainder is > 100”. Try amending your code to satisfy this condition instead.
3rd Nov 2020, 2:33 PM
Russ
Russ - avatar