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

what does the author compare the pipe to in the first stanza?
What is the goal of using a personal budget answers?
Kaine has 25 animals. Eight of them are cats. What percent of his animals are cats
Do you know how cities, merchants, artisans, and money changers changed the European economy in the Middle Ages? Study this painting of a 15th century market to
show that f(x)=√x-5 is one-to-one and find f^-1how to do this and what is the equation called? please include solutions, thank you.
What price will farmer brown charge when maximizing​ profit?
As you watch the surfers right away towards the shoreline what is the shoreline
The graph shown here displays the distance, in miles, traveled by an airplane in a certain number of hours. Based on the graph, which of the following equations
Relationships are __ functions Always Sometimes Never
I need help somebody please help (photo included)