Test Index

CBSE Class 12 Computer Science 2024 Paper Set 4 Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 20 of 35
Marks: +1, -0
The code given below accepts five numbers and displays whether they are even or odd :
Observe the following code carefully and rewrite it after removing all syntax and logical errors :
Underline all the corrections made.
def EvenOdd()
for i in range(5):
num=int(input("Enter a number"))
if num/2==0:
print("Even")
else:
print("Odd")
EvenOdd()
Advertisements
Go to Question: