vendredi 14 septembre 2018

How to fix code that uses input() and if (Python-3) (Incredibly Simple)? [on hold]

Im new to programming, Started learning Python-3 yesterday, im trying to make a simple program that asks a user for his/her name and if the answer is "Jake" then the code says "Welcome Back". If not it says "Hello new user" but my code doesn't work , instead im greeted with this:

My code is as follows:

print ("State your name")
name = (input()
if name == "Jake"
  print ("Welcome Back")
else
  print ("Hello New User")

And yes, I know that this question is incredibly basic but I just need to understand the syntax of Python-3 so that I can successfully use it.

Aucun commentaire:

Enregistrer un commentaire