- 5

Write a program  to accept the grades for 5 students, and print a summary report as follows : Grade A :…… Grade B : …… Grade

18th Sep 2020, 4:56 AM
Jaina Solanki
Jaina Solanki - avatar
5 Antworten
+ 6
Jaina Solanki Why not first show your attempt and then ask for the answer🤔
18th Sep 2020, 4:58 AM
‎Ashwin Maurya
‎Ashwin Maurya - avatar
+ 5
It looks like you wrote this external to Sololearn. Do you get the error when tring to run your code on Sololearn. All inputs must be entered at the same time before hitting run, else you get an error. (eof - I think) This makes it hard to test while loops within sololearn that prompt for user inputs on each cycle. Your code will run if you enter Bob A Jak B Ken C BEFORE YOU HIT RUN
18th Sep 2020, 5:38 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
1) #FOR 3 STUDENTS i=1 while i<=3: SN=input("ENTER THE STUDENT NAME") G=input("ENTER THE GRADE") if G=='A': A='A' a = SN elif G=='B': B='B' b = SN elif G=='C': C='C' c = SN i=i+1 print("Grade",A,":",a) print("Grade",B,":",b) print("Grade",C,":",c) Getting error in print part, any idea what's wrong ?
18th Sep 2020, 4:58 AM
Jaina Solanki
Jaina Solanki - avatar
0
Any idea what's wrong ? Ashwin Maurya
18th Sep 2020, 5:22 AM
Jaina Solanki
Jaina Solanki - avatar