0
Pls what's wrong with these code
siblings = int(input()) popsicles = int(input()) if popsicles>=siblings: x=popsicles%siblings if x==0: print("give away") else: print("eat them yourself") else: print("eat them yourself")
3 Answers
+ 2
You've given the first else condition inside the if x==0 block
It'll give syntax error. (considering it's not just a copy paste mistake)
By the way,
You can write your first condition like
if popsicles>=siblings and popsicles%siblings==0:
print(give away)
else: print (whatever)
Why use nested if else?