0
Everything works except my name, it sayd that Nikola is not identified. How do i make it recognise my name?
#FakeBook name = str(input("Enter your name: ")) print(name) age = int(input("Enter Age: ")) print(age) if (age >= 24): print("Bro you old") if(age<1000): print("Its less than 1000") if (name == Nikola): print("But ur Nikola so its ok")
4 Réponses
+ 5
Nikola is considered as a variable, it does not exist. Use double quotes for strings:
if(name == "Nikola"):
+ 3
No problem 👌
+ 3
Just an extra: user input is a string by default, so you don't need to convert it with str().
+ 1
Oh yeah.. thanks
Ill try it out right away :D