Computer Science, asked by vijaykr2028, 5 months ago

3-Write a program in Python to check whether the students are qualified for the
final round of Inter School Quiz Competition if they score above than 45 marks
out of 50 in preliminary round

Answers

Answered by anindyaadhikari13
2

Solution:

The given problem is solved in Python.

score = float(input('Enter your score out of 50: '))

if score > 45:

   print('You are eligible.')

else:

   print('You are not eligible.')

Explanation:

  • Logic for the program is very simple. We ask the user to enter the score. The marks is then stored inside a variable (Line 1)
  • Now, we check whether score > 45 is true or not using if statement (Line 2).
  • If the condition is true, program prints You are eligible. (Line 3)
  • If the condition is false, the else block executes and prints You are not eligible. (Line 4, 5).
  • Hence, our problem is solved.!!

Refer to the attachment for output.

Attachments:
Similar questions