0

What’s wrong with my code?

Either I get no output all the time or invalid syntax I can’t see where I’m going wrong? https://code.sololearn.com/c83yUq08tCFG/?ref=app https://code.sololearn.com/cd0x8bjjpf3v/?ref=app

30th Jan 2021, 5:17 PM
Marshay Thompson
Marshay Thompson - avatar
2 Respuestas
+ 2
# Corrected: name = input("what is your name? ") age = int(input("What is your age?")) x = 12 if age < x: print ("Too Young") else: print (name,age) pay attention to indentation in python also, if and else statements enda with colon ":"
30th Jan 2021, 5:26 PM
minirkk
minirkk - avatar
+ 2
Corrected: x = input() print("Hello" + x) Pay attention to the error you made in your code. print is a function and not a variable. if you have gone through the tutorials then you must have known that a function takes arguments just like this print("hello") print is function "hello" is argument
30th Jan 2021, 5:27 PM
minirkk
minirkk - avatar