+ 2

Why the output of this code is error ??

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

15th Feb 2021, 2:15 PM
Carbon dioxide
Carbon dioxide - avatar
3 Answers
+ 4
You need to convert num to str to concatenate it with string. Or you can do string format with: f"{num} is an odd/even number"
15th Feb 2021, 2:20 PM
加油 我先下了
加油 我先下了 - avatar
+ 2
Thanks CarrieForle ... I'm forget...😅
15th Feb 2021, 2:25 PM
Carbon dioxide
Carbon dioxide - avatar
+ 1
You must convert the num into a sring agian before concatenation
16th Feb 2021, 3:09 AM
Osei Michael
Osei Michael - avatar