+ 1

Ice cream for every one: Task 2 failed but every other task passed.

#The sollution for the "Ice-cream for Everyone" money = int(input()) price = int(input()) total = price * 10 remaining = 0 if (money >= price * 10): print(money-total)

7th Jan 2021, 1:18 AM
Swiff _Vastolorde
Swiff _Vastolorde - avatar
8 Respuestas
+ 3
As far as I know, the test case 1 and 2 are not hidden right? So I think you can adjust it, or if you can't, can you tell us what the test case 2 is? Thanks. money = int(input()) price = int(input()) total = price * 10 remaining = 0 if (money >= total): print(money-total)
7th Jan 2021, 1:23 AM
noteve
noteve - avatar
+ 1
What is the expected output?
7th Jan 2021, 12:38 PM
noteve
noteve - avatar
+ 1
can you save the details on a code bit? and also the text inside the yellow box in the challenge. Thanks!
7th Jan 2021, 12:53 PM
noteve
noteve - avatar
+ 1
Swiff _Vastolorde I don't know the exact details of the problem but I search and search until I found the details and it turns out that if the total price is greater than 100, do not output anything or output 0. So the code should be like this: money = int(input()) price = int(input()) total = price * 10 remaining = 0 if (money >= total and money <= 100): print(money-total)
7th Jan 2021, 1:08 PM
noteve
noteve - avatar
+ 1
《 Nicko12 》 thanks man. That worked. So I was missing the and.
7th Jan 2021, 1:54 PM
Swiff _Vastolorde
Swiff _Vastolorde - avatar
0
《 Nicko12 》 Test case #2 is 151 13
7th Jan 2021, 12:37 PM
Swiff _Vastolorde
Swiff _Vastolorde - avatar
0
《 Nicko12 》 0, or blank
7th Jan 2021, 12:38 PM
Swiff _Vastolorde
Swiff _Vastolorde - avatar
0
Yeahh
7th Jan 2021, 1:03 PM
Swiff _Vastolorde
Swiff _Vastolorde - avatar