+ 3

Why, my code showing error in code coach editor [sololearn]

https://code.sololearn.com/cUJnIknUonGO/?ref=app

30th Jul 2022, 9:32 AM
Shiva Kumar
Shiva Kumar - avatar
2 odpowiedzi
+ 5
You just didnt type output string as thay ask for. Replace 'I got this' with 'I got this!' You missed ! here Also, remove space from end in this one: 'Good Luck out there ! ' - to be 'Good Luck out there!'
30th Jul 2022, 9:42 AM
PanicS
PanicS - avatar
+ 1
The input asks for a number, so if you put a number in the input it should work well but if you put a string it gives an error as the code tries to turn the string into a number. Strings can be turned into ints(whole numbers) so long as the string is not made of letters. For example: print(int("45")) // 45 print(int("hi")) // ERROR The first example turned a string to a int but the second couldnt as the string was made up of letters. God bless
30th Jul 2022, 10:16 AM
Will