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

the sum of two numbers is 83 and one of the number is x. what is the other number?
what is the set of counting number less than 10?
Find the domain and range of this function f(x)=1/squareroot of (x-4)
twice a number is equal to seven more than four times the number
the sum of two numbers is 83 and one of the number is x. what is the other number?
if the slope is 26.5° what is the rise per meter
Find the additive inverse of each number 1.) 3-7i 2.) -2 + i
what is .08 divided by .0094
In a triangle, the sides measure 3,5, and 7 what is the measure, in degrees of the largest angle?
what is the exact value of sin 22.5 degrees using the sum, difference, half, or double angle formulas and the exact value chart in the solution.