When I write (It is in the Description) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

When I write (It is in the Description)

Def sword(): Print ("Sword") In = input("") If In==("sword"): Sword() But then it says syntaxerror

25th Jul 2017, 6:54 AM
Coding Master
 Coding Master - avatar
3 Answers
+ 5
@Coding Master you cant use upper and lowercase as you want. I think you are coding in Ruby so you can check sintax in https://code.sololearn.com/c0yp6W5vky7B#py Try to check difference between upper and lowercase, comparing with your code.
25th Jul 2017, 7:09 AM
Daniel
Daniel - avatar
+ 1
python? first of all python is case sensitive so don't use Def, Print, or If... use def, print, if. also you defined it as sword() but then rewrote it as Sword() I think it should all work after you do these things, I'll go check your code now.
25th Jul 2017, 6:59 AM
God Usopp
God Usopp - avatar
+ 1
yes, your code runs fine after I took off the unneeded upper case
25th Jul 2017, 7:11 AM
God Usopp
God Usopp - avatar