I am viewing a video wherein the trainer runs this code as it is and get the result. I’m a newbie to python and when i replicate the same I don’t see any out. All I see in my Console is “Process finished with exit code 0”.
Could you please help me?
def main():
name = input("Enter your name")
print(name)
age = input("enter your age")
print(age)
############################
if __name__ == " __main__":
main()
What operating system (OS) are you using?
How are you running the code you have written?
Usually you can start a terminal and run the code from the command line.
Example details depend on the OS.
On windows you can type py myprogram.py on other OS its likely you type python3 myprogram.py. Make sure you sure you are in folder where your code is.