How do I make a menu in python?
How do I make a menu in python without tkinter? I try combining html and python to no avail.
jimeastman
What the heck is a cycle? I clicked on an answer and
@amaddentcsec got 5 cycles.Codejira
I made a menu the other day. Console only.
See https://repl.it/@Codejira/Text-Menu for inspiration.
jimeastman
Thanks for the [email protected]
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.
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
jimeastman
Thanks for the [email protected]
Coder100
well HTML isn't going to work well with python...
Anyways, what are you trying to do?
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.
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!
[email protected]