print ("hi")
k= input("what's your name ?")
if len(k) > 0 and k.isalpha():
print "hi"+ k
else:
print ("say something ")
Expected output:
hi
what’s your name?
XXXXXX
hi,XXXXXX !
OR
hi
what’s your name?
say something
Actual output:
hi
what’s your name?
XXXXXX
(END)
today in the guess the language, are we suppose to recognize the language? Including such details is important to make a good question, which will result in a better answer, which will make you (hopefully) happier
what language are you programming in? It looks python, which python version are you coding in? To me, this looks like a mix of python2 and python3.
1 Like
if you have python3, here you use print as a statement:
print "hi"+ k
in python3, print is a function call, not a statement
1 Like