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

Help solve this pleASE
Identify the characteristics of east Germany
What did the Second Continental Congress do?(1 point) wrote Common Sense wrote, Common Sense passed the Intolerable Acts passed the Intolerable Acts sent a peti
What is a valid mental health resource
fill in the y-values for each of the x-values given in the table
how is gobi desert threatened by humans?
100 points pls answer correct 1) Which statement BEST states the theme of this poem? A) Anyone can fall in love.B) Love is risky and should be avoided.C) Love c
What is the slope-intercept equation for the following line?
The Salmonella bacteria infect human, when eating contaminated food or water, causing some symptoms as diarrhea. Which part of the alimentary canal is most affe
What did the Nuremberg Race Laws Accomplish? A. They expelled Jewish people from Germany. B. They sent Jewish people to concentration camps. C. They authorized