+ 3

Python code coach

This is my code coach problem siblings = int(input()) popsicles = int(input()) #your code goes here n = int(input()) m = int(input()); print('n/m') print ('Eat them yourself') So I should be working on inputting two integers and output 'Eat then yourself’ or 'Share’ and everything I do they keep saying there’s an error 😂 please tell me what the heck am I doing wrong 🤣

21st Oct 2020, 12:33 PM
Jennisha Smith
Jennisha Smith - avatar
6 Respuestas
+ 5
Actually ur condition stmt is wrong. It should go like: if popsicles%siblings==0: print("give away") else: print ("eat them yourself")
21st Oct 2020, 12:38 PM
Alphin K Sajan
Alphin K Sajan - avatar
+ 5
Wlcm. Keep Coding
21st Oct 2020, 12:41 PM
Alphin K Sajan
Alphin K Sajan - avatar
+ 2
Thank you guys 😅 I knew everything I was doing didn’t make sense
21st Oct 2020, 12:39 PM
Jennisha Smith
Jennisha Smith - avatar
+ 2
QTWizard, I wanted to solve the problem and fix the error i made
21st Oct 2020, 12:43 PM
Jennisha Smith
Jennisha Smith - avatar
0
Add eval before 'n/m' or remove the quotes. print(eval('n/m')) Or print(n/m)
21st Oct 2020, 12:38 PM
QTWizard
0
Sorry, i didn't know if you wanted to solve the problem or the error.
21st Oct 2020, 12:41 PM
QTWizard