0
Program is public. Can you search it and help us find the error? We are learning this for a science fair project and are stuck!
I think we have suits defined, but keep getting error. https://code.sololearn.com/cSe2zFcpja2X/?ref=app
6 odpowiedzi
+ 4
You've defined suits inside a class definition. It is not available outside that definition.
+ 2
Your code as it is has a lot of issues. No offense, but it looks to me like you put it together by copying the code snippets from this link without really understanding how they relate to each other:
https://www.askpython.com/JUMP_LINK__&&__python__&&__JUMP_LINK/examples/terminal-hi-lo-game-in-python
Take a look at the section titled "The Complete Code" to see how to put them together correctly.
+ 1
I've tried the code from askpython.com and it runs without error. The EOF (end of file) error is due to the limitations of the sololearn playground. When you run code in sololearn it is sent to a server where it is executed and the server returns the output (if any). So there is no interactivity. If your program needs input you have to give all the input before the code is sent to the server by entering it all in the popup that appears when you run a program. Different inputs have to be put in different lines. This works fine in cases where you don't need many inputs and most importantly know in advance exactly how many inputs you need and what they will be. That's not the case with the code you're using. And if you run the code with less inputs than it will need the program keeps looking for the necessary input, but can't find it. And that leads to the EOF error.
Mobile apps are not particularly well suited for programming, so if you have access to a desktop system I'd recommend using that. If you don't you can try a python IDE app. The best one for android seems to be Pydroid.
0
we did the complete code part and it had issues too. It was the first error- cards not defined.
and, no offence taken- we know nothing about code and exactly copied this code from the above website.
Its a case of son wants to do this project and mom said ok... but coding is WAY harder than we anticipated!
0
ok... think I fixed most of it but need help with an EOF error....
0
Simon Sauter Thank you. I appreciate your time.