+ 2

Plz help in python

siblings = int(input()) popsicles = int(input()) a=siblings b=popsicles if (a%b)=0: print ("give away") else: print ("eat them yourself")

10th May 2021, 7:23 AM
I am not a Programmer
I am not a Programmer - avatar
4 odpowiedzi
+ 8
At line 5 there were to errors one because of it will be (b%a) instead of (a%b) . And the second one it will be (b%a)==0. And then it will also showing error on line 7 as there the indentation is unwanted. siblings = int(input()) popsicles = int(input()) a=siblings b=popsicles if (b%a)==0: print ("give away") else: print ("eat them yourself")
10th May 2021, 7:28 AM
Kǟrɨsɦmǟ ❥
Kǟrɨsɦmǟ ❥ - avatar
+ 1
In line 5, it's supposed to be == instead of = since you're trying to make an operation to check if a%b is equal to 0 or not In line 7, no need to indent "else" since it doesn't belong to any "if" other than the only "if" operation on line 5; delete that white space
10th May 2021, 7:27 AM
RRINN
RRINN - avatar
+ 1
In if statement use "==" at place of "=". And there is unwanted space before a (3rd line )
10th May 2021, 7:30 AM
Yash Wable 🇮🇳
Yash Wable 🇮🇳 - avatar
+ 1
Switch the = to ==
8th Sep 2021, 8:08 PM
CGO!
CGO! - avatar