Zethus
Zethus

Reputation: 27

My code is printing none, and i dont know why

I was just like studying/practicing, and I want to start by creating the "Menu":

Menu = input(print("Please choose an option from the menu: \n 1. Information \n 2. Modify my account \n 3. Log out"))

if Menu == "1" or Menu == "Information":  
    print("What do you want to modify: ")

elif Menu == "2" or Menu == "Modify my account":
    print("What do you wanna modify: ")

elif Menu == "3" or Menu == "Log out":
    print("You already logged out, we will be waiting for you")

else:
    print("la cagaste")

and this works as I want for the moment, but it also prints "none"

Please choose an option from the menu:

  1. Information
  2. Modify my account
  3. Log out Nonefas #The fas is something that I typed just to print the result "la cagaste"

Process finished with exit code 0

Upvotes: 0

Views: 39

Answers (1)

mutantkeyboard
mutantkeyboard

Reputation: 1714

You don't need a print inside your input.

Also, please use code formatting next time.

Here you go

menu = input("Please choose an option from the menu: \n 1. Information \n 2. Modify my account \n 3. Log out\n")

if menu == "1" or menu == "Information":

    print("What do you want to modify: ")

elif menu == "2" or menu == "Modify my account":

    print("What do you wanna modify: ")

elif menu == "3" or menu == "Log out":

    print("You already logged out, we will be waiting for you")

else:

    print("la cagaste")


Upvotes: 2

Related Questions