Computer Science, asked by shameelaashraf, 6 months ago

pls answer this question
this is class 8 python conditonal statement worksheet
whoever answer this question I will mark them as the BRAINLIEST if it is correct only
all the 2 questions have to be answered​

Attachments:

Answers

Answered by Unni007
3

Question-5

1. Start

2. Read the three numbers to be compared, as A, B and C.

3. Check if A is greater than B.

 3.1 If true, then check if A is greater than C.

   3.1.1 If true, print 'A' as the greatest number.

   3.1.2 If false, print 'C' as the greatest number.

 3.2 If false, then check if B is greater than C.

   3.1.1 If true, print 'B' as the greatest number.

   3.1.2 If false, print 'C' as the greatest number.

4. End

Question-6

sub1=int(input("Enter marks of the first subject: "))

sub2=int(input("Enter marks of the second subject: "))

sub3=int(input("Enter marks of the third subject: "))

sub4=int(input("Enter marks of the fourth subject: "))

sub5=int(input("Enter marks of the fifth subject: "))

avg=(sub1+sub2+sub3+sub4+sub4)/5

if(avg>=90):

   print("Grade: A")

elif(avg>=75):

   print("Grade: B")

elif(avg>=60):

   print("Grade: C")

elif(avg>=50):

   print("Grade: D")

elif(avg>=33):

   print("Grade: E")

elif(avg<33):

Similar questions