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

Why do you think all the Israeli- Palestinian accords ultimately have failed?
which of the following illustrates jinnah's argument for india's partition ? a) people from different cultures cannot maintain their unique traditions b) divis
This is for people who have read Skellig by David Almond. How do the 'Skellig Rocks' connect to the book and how did they inspire David Almond. Also please give
what does the presidential power of veto allow
Which could be the measures of the three angles of an acute triangle? A. 30°, 30°, 120° B. 30°, 60°, 90° C. 50°, 55°, 75° D. 40°,
How do I give proper documentation. ex: If I were writing a paper and needed to say were I got my info from. (I got it online)
explain how the response of the League of Nations and of Britain, France, and other European nations to Axis aggression contributed to the start of the war?
Let f(x) =4x-1 and g(x) = 2x^2 + 3 (fg)(x) , f/g(x), g/f(x)
One of the three " highways of water" bordering Greece
solve the proportion x/6=15/20