Computer Science, asked by sakshichopra2020, 7 months ago

Find errors in the given python program. Rewrite the corrected code and
underline the changes done: (4 mistakes)

num1 == integer (input (“Enter a number”))
if num1 < 10 then
print(num1)
elif:
print (“bad input”)

Answers

Answered by narendrapoonia8574
1

Explanation:

The lithosphere is the solid, outer part of the Earth. The lithosphere includes the brittle upper portion of the mantle and the crust, the outermost layers of Earth's structure. It is bounded by the atmosphere above and the asthenosphere

Answered by prathamraj26
0

Answer:

num1 = int(input("Enter a number"))

if num1<10:

    print(num1)

else:

    print("bad input")

Explanation:

This is the correct code.

Also, remember that python is a case-sensitive language and gaps are important.

Errors:-

Line 1 - there should be only in "=" sign, for the integer data type you need to put int.

Line 2 - Instead of "then" there should be ":" as "then" is not the part of the syntax and ":" is.

Line 3 - Put gaps

Line 4 - Instead of 'elif' use "else" because for elif you need more than one if statement.

Line 5 - put gaps

Similar questions