Please help on python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please help on python

Write program that has two variables nApples and nKids. Assign integer values to these variables. Divide the number of apples by the number of kids. Display the result using a command in a statement: There are....Kids and... Apples Each kid gets....apples, and ....apples remain

29th Jan 2020, 1:34 AM
Marcia Tempel
Marcia Tempel - avatar
6 Answers
+ 2
I do not know Python but I still tried- see if this helps https://code.sololearn.com/c9s2xpbs3fXZ/?ref=app
29th Jan 2020, 2:16 AM
Avinesh
Avinesh - avatar
+ 2
https://code.sololearn.com/c6u3VVZAroBb/?ref=app
29th Jan 2020, 2:19 AM
BroFar
BroFar - avatar
+ 1
Share with us the code that you have written for this particular problem so that someone can help you. Without your attempt first, there is no point in asking for answers.
29th Jan 2020, 1:39 AM
Avinesh
Avinesh - avatar
0
I don't know if I'm using the right formula. The output gives me errors \nApples=6 \nKids=3 \n=(6//3) NB* for dividing apples by the number of kids NB* command statement There are (3) kids and (6) apples. Each kid gets (1) apples, and (3) apples remain.
29th Jan 2020, 1:48 AM
Marcia Tempel
Marcia Tempel - avatar
0
Thank u so much guys☺️
29th Jan 2020, 2:25 AM
Marcia Tempel
Marcia Tempel - avatar
0
what error are you getting if it is a syntax error ,note that python variables can only start with _ or a letter and not a backslash or any other 'special' character and I don't know why each kid receives 1 apple instead of 2 and 0 remain.
29th Jan 2020, 7:51 AM
John
John - avatar