Computer Science, asked by SAMANYUSINGH130309, 4 months ago

Create a python program to input the runs scored by a batsman in a match. Based

on the scored runs by the batsman, the program should display a message

whether a batsman has scored a century or not.​

Answers

Answered by dreamrob
22

Program:

a = int(input("Enter runs scored by a batsman : "))

if a >= 100:

   print("He has scored a century")

else:

   print("He has not scored a century")

Output 1:

Enter runs scored by a batsman : 120

He has scored a century

Output 2:

Enter runs scored by a batsman : 76

He has not scored a century

Question for practice:

Create a python program to input a number and check whether the number is prime number or not. Program should display a proper message.

Similar questions