+ 1

Hello! I want to build a calculator and I know how to made it but idk how to make buttons of it Like when you see in real clacu

I just want to make the buttons of '+' '-' and etc. .. I have made all the code but the buttons are rest. Plzz 🙏 help if u can This is my code https://code.sololearn.com/cku56zm7Up8t/?ref=app

23rd Oct 2020, 3:38 AM
saksham gamer
saksham gamer - avatar
9 Réponses
+ 5
saksham gamer Sorry to tell you this, but here in SoloLearn, web codes are the only ones with GUI support. Python and other languages here run in simulated console (no graphics).
23rd Oct 2020, 3:59 AM
Ipang
+ 3
I dont know python very much but what i do know is that when working with a launguage like python you dont have the things that you would have with javascript where you can use html and css to create images and use input from the buttons pushed with javascript and then print the result. with python though if you dont want to have the input going through the console, you are going to have to use a GUI library for python to create images and buttons for your calculator. There are many librarys but a popular one that i have heard of is Tkinter. So i would learn a GUI library like that if you want to build a calculator. I have seen tuturials that teach you how to use Tkinter to make a calculator so i would recommend starting with one of those. I hope this helped.
23rd Oct 2020, 3:57 AM
socksrulez
+ 3
Ipang thnks for the help man 👍
23rd Oct 2020, 4:02 AM
saksham gamer
saksham gamer - avatar
+ 3
saksham gamer I did look at your code, i dont have much knowledge of python but it looks good. Im also 14 and recently started not to long ago
23rd Oct 2020, 4:02 AM
socksrulez
+ 3
You could use js for that Or you can use a GUI tool like tkinter.. Alao you need pc for that... You cannot run tkinter or any GUI lib on sl
23rd Oct 2020, 4:15 AM
Shreyansh
Shreyansh - avatar
+ 2
Alright man 👌 And good luck with Python graphics 👍 saksham gamer [Sigh] sorry but DM don't work bro ...
23rd Oct 2020, 4:06 AM
Ipang
+ 2
saksham gamer , use tkinter to build desktop gui. You will love it. then the other code is almost the same. Not on playground ofcourse. Well actually you can build it even here in solo learn playground. But with another toolkits. HTML, CSS, and yes, you are right... JS.
23rd Oct 2020, 4:26 AM
Shadoff
Shadoff - avatar
+ 1
socksrulez oke I'm also a beginner in programming just 14yrs :) so I also don't know too much about python I'm at loops till now 😅 so I would postpone this program. Also can u look at my code mention above and give me some advices. 👍🥺
23rd Oct 2020, 4:00 AM
saksham gamer
saksham gamer - avatar
+ 1
You need to learn GUI for this # You can't do this in Sololearn, for this you would require an IDE (Pycharm, Jupyter,..., Pydroid(for android...)...)
24th Oct 2020, 10:58 AM
Md. Faheem Hossain
Md. Faheem Hossain - avatar