When I run my script there is no output. It just does not output any text.
#!/usr/bin/env python
#coding: utf-8
def main_menu():
print "this is the main menu"
What am I doing wrong?
When I run my script there is no output. It just does not output any text.
#!/usr/bin/env python
#coding: utf-8
def main_menu():
print "this is the main menu"
What am I doing wrong?
Because you just declared the function and never called it. Try this:
def main_menu():
print ("This is main menu")
main_menu()
I hope this helps. Have a great day!
Try this:
#!/usr/bin/env python
#coding: utf-8
def main_menu():
print "this is the main menu"
if __name__ == "__main__":
main_menu()
You need to call the function in your script.
The simplest way would be to add this below your function definition
main_menu()