[Python] Input function in the Jupyter Notebook

Discussão em 'Python' iniciado por Stack, Dezembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    #correct email: sonu.yadav19997@gmail.com
    #correct password: 1234

    email = input("Enter your email")
    password = input("Enter your password")
    if email == "sonu.yadav19997@gmail.com" and password == "1234":
    print("Welcome")
    else:
    print("Incorrect user input")


    I wrote a program with input function. Unfortunately, I ran the program after writing the first two lines with input function before I had written other lines of code. The code worked and asked for user input. I didn't put anything in the user input boxes and instead completed writing the code. When I ran the complete code, the code moved to the next cell instead of asking for user input. I tried copying and pasting the entire code to a new cell and deleting the old cell but that didn't work. I created a new ipykernel file and wrote the same code. The code worked in a new file and asked me for the user input.

    What's the problem?

    Continue reading...

Compartilhe esta Página