Please can anyone help with the code for 'ice cream for everyone'? I have written several codes but still experiencing bugs | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please can anyone help with the code for 'ice cream for everyone'? I have written several codes but still experiencing bugs

4th Feb 2022, 7:56 PM
Adole Moses
9 Answers
0
sample python code: a,b = int(input()),int(input()) if a//10>=b: print(a-b*10) if it needs more modification, do it yourself.
4th Feb 2022, 9:00 PM
Behzad Soleimani Neysiani
Behzad Soleimani Neysiani - avatar
+ 3
Please show your code so we can help you!
4th Feb 2022, 8:04 PM
Lisa
Lisa - avatar
+ 2
I think you should include "Python Core: 19.4" and the code you tried to do, to make it easier to help you. "...output the remaining money only if you can buy that ice-cream for your all 10 friends. Sample Input 80 7 Sample Output 10 Explanation. To buy 10 ice-creams you need 7*10 = 70. The remaining money is 80-70 = 10. Do not output anything if you don't have enough money." Here is all that is needed: https://www.sololearn.com/Course/Python/2276/?ref=app https://www.sololearn.com/Course/Python/2277/?ref=app If you need more help, you know, share your code.
4th Feb 2022, 8:06 PM
CGM
CGM - avatar
+ 2
Thanks guys. The code Behzad wrote worked.
4th Feb 2022, 9:53 PM
Adole Moses
+ 1
Please show the code?
4th Feb 2022, 8:06 PM
Adriel Alejandro Aliaga Benavides
Adriel Alejandro Aliaga Benavides - avatar
+ 1
๐Ÿ˜ƒ Cristian Gabriel Mazzulla, I know and studied it in comparison with the one I wrote earlier. Thank you for the advice.๐Ÿ™๐Ÿพ
5th Feb 2022, 5:32 AM
Adole Moses
0
Adole Moses The code is not supposed to be written by Behzad Soleimani Neysiani , you are supposed to do it yourself๐Ÿ˜† but just make sure you understand it perfectly, since it is basic!
5th Feb 2022, 3:09 AM
CGM
CGM - avatar
0
Adole Moses, Don't forget to tag the question as solved and if you want, like the answer. Sincerely
5th Feb 2022, 4:58 AM
Behzad Soleimani Neysiani
Behzad Soleimani Neysiani - avatar
0
Bill It is not helpful to beginners to post codes without any explanation. The 2nd if statement is unnecessary
2nd Apr 2022, 9:40 AM
Lisa
Lisa - avatar