Fill the blanks to declare a variable add 5 to it and print its value (what is wrong here ) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Fill the blanks to declare a variable add 5 to it and print its value (what is wrong here )

>>> x =4 >>>x +=5 >>>print (9)

29th Mar 2020, 3:59 PM
Fabrice njodzeven
Fabrice njodzeven - avatar
2 Answers
+ 1
Many mistakes: 1. indeltation error on line 1 due to use of extra space before "x = 4" 2. You have used "FULLWIDTH LEFT/RIGHT PARENTHESIS --> ()" instead of normal parentheses --> (). 3. If you are printing value from a variable, than why you have printed 9 directly on line 3. The correct code would be: x = 4 x += 5 print(x)
29th Mar 2020, 4:11 PM
Bibek Oli
Bibek Oli - avatar
29th Mar 2020, 5:03 PM
Piyush Srivastava
Piyush Srivastava - avatar