Find Errors, if any in the following script written in Python:
a=int(input("enter number")
if a 50
print("red")
else:
print("black")
Attachments:
Answers
Answered by
4
Answer- The above question is from the chapter "Brief Overview of Python".
Python-
Python is a simple programming language.
It has been created by Guido van Rossum and launched in 1991.
Its features make it easy to understand and this language is used a lot in the big companies and industries.
Given question: Find errors, if any in the following script written in Python:
a=int(input("enter number")
if a<50
print("red")
else:
print("black")
a=10
b=20
a+b=c
PRINT(c)
Answer: (Errors have been highlighted using 'Bold' and correct cod.e is included.)
a=int(input("enter number"))
if a<50:
print("red")
else:
print("black")
a = 10
b = 20
c = a + b
print(c)
Output:
enter number 2
red
30
Similar questions
Math,
2 months ago
English,
2 months ago
English,
2 months ago
English,
10 months ago
Social Sciences,
10 months ago