+ 1
Please can you tell me why that code isn't working ?🙏
14 Answers
+ 2
Programer F_K
Made an html game from your idea with HTML and javascript
https://code.sololearn.com/WEmzSzcv4XEU/?ref=app
+ 5
The sololearn playground does not support tkinter or other GUIs.
+ 4
If you are on mobile, you can use pydroid app
+ 3
Programer F_K maybe the reason for the error is the input line. We are taking a input in python but not passing any input because there is no option as only tkinter window is showing in pydroid.
I tried replacing the c = input() at line 81 and line 92 with a string "hello", the program gives no error but it also doesn't work?
+ 2
Yes. Not easier, but more versatile, and more portable.
Have you ever tried making an exe out of a Python file?😅
But everybody uses a browser.
+ 1
Sandeep I write it in pydroid but it doesn't work . It shows EOF :error when reading a line
+ 1
Programer F_K
In line 107, you are calling the exe_function in command argument. You need to specify the name of the function, it will automatically get called when clicked
Instead of:
> tkinter.Button(text='jouer', command=exe_function()).pack()
Do:
> tkinter.Button(text='jouer', command=exe_function).pack()
+ 1
Sandeep I've corrected it but it still shows error when reading a line (about line 81) .
+ 1
Sandeep maybe the reason is that the tkinter library doesn't work on pydroid .
Anyway , thank you so much 🙏
+ 1
Programer F_K
Here is a simplifed version of what I think you are making. It was a good tkinter refresher course. Now I know why I decided to learn Html and javascript...
Does not work in Sololearn since it is a tkinter code. But I tested it on Pydroid
https://code.sololearn.com/cVpDR5fs0tZz/?ref=app
+ 1
coding in tkinter requires a different mental model.. you have to think in terms of widgets, their properties and how to pass data into and out of them.
The code is still very raw. Almost no error handling, terrible styling, hardcoded variables.... that is for you to work out...
+ 1
Bob_Li it's very good .
That what I wanted to do too.
Thanks
0
Bob_Li Yes it works . Thanks.
0
Okey . Thanks for you advice .
But , is javascript easier than python ? For game devlopment