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 emu is a large, flightless bird found in Australia. Many years ago, this bird was also found in Tasmania and King Island, but today, it is only seen on th
pls show working out thanks
I NEED HELP PLEASE I NEED HELP PLEASE
How can the relative positions of an aquifer and aquiclude result in the presence of a spring?
Use the Distributive Property to express 16+48 (with work)
What was sold into enslavement after a local or tribal war?
-12=-5-6n+11 solve it for me
Franklin Delano Roosevelt's Infamy Speech December 8, 1941 "Yesterday, December 7, 1941—a date which will live in infamy—the United States of America was sudden
Which was one result of China's isolation from the rest of the world? A. The borders of China shrank. B. Demand for Chinese goods fell. C. Development in China
calculate the molarity 4.0 g of KOH in 2.0 L of solution