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 did the leopard say after lunch? use the table of trigonometric rations to do each exercise.
I NEED HELP ASAP!!! I like don’t understand it and somehow I’m finding it difficult even thought I’ve done this so many times
(4.5 * 108) / (1.5 * 105)
Evaluate the integral of (5)/(sqrt(x³)) dx
What is a main idea of paragraphs 3-4 in “Amelia Earhart”? Responses Earhart pioneered the way for women in aviation. Earhart pioneered the way for women in avi
When considering McGregor's Theory X, Y, and Ouchi's Theory Z, which of the following statements is the most accurate assumption? 1) Theory X dislikes work and
Which of the general mechanisms discussed in class are NOT involved in receptor tyrosine kinases-mediated trans-membrane signaling? a. Protein-protein interacti
why do plants experience increase growth in the springtime?
Find the indicated term of the geometric sequence. What is the 6th term of 1, (1)/(3), (1)/(9), __________.
3. Write a question about the process of osmosis, based on what you have learned 51412-180