+ 2

I'm getting an EOFerror and don't know how to fix it....

sibs = int(input()) pops = int(input()) if popsicles%siblings==2: print("give away") else: print("eat them yourself")

26th Dec 2024, 1:22 PM
Bhumika Kanwar
Bhumika Kanwar - avatar
5 ответов
+ 11
Bhumika Kanwar There is a Name error because popsicles and siblings variables are not defined. Replace `popsicles` to `pops` and `siblings` to `sibs` in your code and run again. Also there is an extra space before if statement that will cause indentation error.
26th Dec 2024, 1:43 PM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 6
Bhumika Kanwar , the *EOFError* may be caused by the input procedure of the sololearn playground. > all input data are required to be done upfront in a popup window, for each input in a separate line. then press submit.
26th Dec 2024, 7:14 PM
Lothar
Lothar - avatar
+ 4
Gulshan Mahawar 🤦🏻 thankyou dude,idk why I wasn't able to see that 😅
26th Dec 2024, 1:50 PM
Bhumika Kanwar
Bhumika Kanwar - avatar
+ 4
First 2 lines are "sibs" and "pops" but then you wrote "siblings" instead of "sibs" and "popsicles" instead of "pops", so it's undefined and the EOFError is probably because Sololearn playground input procedure, like Lothar have said
27th Dec 2024, 5:10 PM
☕︎︎AstroParrot✦
☕︎︎AstroParrot✦ - avatar
+ 2
Lothar Thanku
27th Dec 2024, 5:53 AM
Bhumika Kanwar
Bhumika Kanwar - avatar