Skip to content
← Back to Community
How do I make a menu in python?
Profile icon
jimeastman

How do I make a menu in python without tkinter? I try combining html and python to no avail.

Answered by plscodeinjava [earned 5 cycles]
View Answer
Voters
Profile icon
JorgeMontano3
Profile icon
Tharun123
Profile icon
KhalilDancy06
Profile icon
dabs364
Profile icon
jimeastman
Comments
hotnewtop
Profile icon
plscodeinjava

@jimeastman

Tkinter is NOT the only way to make a menu. You can also make a FLASK python repl (which can connect to html), a TURTLE python repl, or a PYGAME python repl. If you do not know how to code in these, simply watch some tutorials!

Profile icon
jimeastman
Profile icon
jimeastman

What the heck is a cycle? I clicked on an answer and

@amaddentcsec
got 5 cycles.

Profile icon
Codejira

I made a menu the other day. Console only.
See https://repl.it/@Codejira/Text-Menu for inspiration.

Profile icon
jimeastman

Thanks for the [email protected]

Profile icon
PattanAhmed

@jimeastman
Hi,
Here is just an example and it is just incomplete :):-
You can try to edit the code on how much flexibility you want.

students = [] ans = True while ans: print (""" 1.Add a Student 2.Delete a Student 3.Look Up Student Record 4.Exit/Quit """) ans=input("What would you like to do? ") if ans=="1": student_name = input('Please input a student\'s name: ') students.append(student_name) print("\n Student Added") elif ans=="2": print("\n Student Deleted") elif ans=="3": print("\n Student Record Found") elif ans=="4": print("\n Goodbye") break elif ans !="": print("\n Not Valid Choice Try again")

Some help was taken from this website

Try and tell me the results.

That's it
Thanks!

Hope this helps

Profile icon
jimeastman

Thanks for the [email protected]

Profile icon
PattanAhmed

@jimeastman
Welcome!
Happy to help you!

Please mark my answer if that helps
Thanks!

Profile icon
Coder100

well HTML isn't going to work well with python...

Anyways, what are you trying to do?

Profile icon
jimeastman

@Coder100
For an assignment for a class I am taking, I have to create a menu of options and based on what menu item a user clicks, it asks them certain questions that they must answer and then gives data based on their answers. I am trying to make a button menu but the Python IDLE that I am required to use does not support tkinter.