mercredi 6 février 2019

New to programming, need help regarding if - elif input in python

I'm new here and I'm self teaching python to myself. Here's a code I've written so far. I'm trying to get a random input from the user. However, I don't understand which command to pass in if statement.

user = input("Enter your name: ")

for n in user:
    if user == input(user);
    print ('Name Entered')

else:
    print('Enter a name.')

Thanks.

Aucun commentaire:

Enregistrer un commentaire