avocadont69
avocadont69 avocadont69
  • 23-03-2022
  • Computers and Technology
contestada

[Python] Spot the errors in the code
x = int(input()
if x == 5
print(x is equal to 5)
else:
print("x is not equal to 5")

Respuesta :

beinggreat78
beinggreat78 beinggreat78
  • 23-03-2022

Answer:

  1. There's no string double quotes in the print statement on line 3.
  2. The input statement on line 1 is wrong. It should actually be the following ⇒ print(input(Hello World))

All print statements must contain double quotes around a string. Otherwise, it will be interpreted as a number, and will lead to an error.

Answer Link

Otras preguntas

In India, Muslims and Hindus a. cooperated without problem b. experienced tensions that lead to conflict c. were in conflict initially but today are united d. d
Write an expression for each statement.Then solve. 5 times the difference between 19 and 13
which of these is not true of Bohr's model of the atom ? A. It decribes electrons as particles B. it predicts that electrons should spiral into the nucleus C. t
when was south carolina established?
__________ is defined as a gathering of people, often for a specific purpose.
What is 63,370 rounded to the nearest ten thousand?
A steel block has a volume of 0.08 m³ and a density of 7,840 kg/m³. What is the force of gravity acting on the block (the weight) in water?
A corporation needs an operating system that allows the various teams in its office to network and collaborate on projects. Which operating system should the co
Why do scientists make biological collections
What is the value of expression? 5−8 • 5−4 a. 532 b. 54 c. 5−4 d. 5−12