Python Forum
GUI for simple python project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUI for simple python project
#1
Question 
Hi,
I am new here. I came here because I need help with GUI for my python project. I don't understand how to make GUI (using tkinter), so please can u help me?
My project is just code witch converts time in formate like 6.82 (you have to use . instead of ,) hour converts into 6 hours and 49 minutes. Can you help me with just simple GUI pls? I want to learn it.
def enterNumber():
    global FloatHours
    FloatHours = input('FloatHours = ')
    try:
        float(FloatHours)
    except ValueError:
        print('Invalid number. Try again.')
        enterNumber()

enterNumber()

hours = int(float(FloatHours))
minutes = int(((float(FloatHours) * 60) % 60))

HoursAndMinutes = f'{hours} hours and {minutes} minutes.'

print(HoursAndMinutes)

end = input('End')
Reply


Messages In This Thread
GUI for simple python project - by Qwertz - Jan-24-2022, 10:24 PM
RE: GUI for simple python project - by deanhystad - Jan-24-2022, 11:27 PM
RE: GUI for simple python project - by Hilal - Jan-25-2022, 04:49 PM
RE: GUI for simple python project - by Axel_Erfurt - Jan-25-2022, 05:49 PM
RE: GUI for simple python project - by menator01 - Jan-26-2022, 10:29 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020