Answer to Question #327144 in Python for Jaijai

Question #327144

Create 4 Variables use input function() (Name (string), Math Grade (float), Science Grade (float), English Grade (integer), Average (float)). Use input statement and display the result: 


1
Expert's answer
2022-04-11T07:49:51-0400

Name=input('Enter the name: ')


while True:

  try:

    Math_Grade=float(input('Enter a Math grade: '))

    break

   

  except:

    print('You can only enter a numbers.')


while True:

  try:

    Science_Grade=float(input('Enter a Science grade: '))

    break

   

  except:

    print('You can only enter a numbers.')


while True:

  try:

    English_Grade=int(input('Enter a English grade: '))

    break

   

  except:

    print('You can only enter a integer.')


Average=(Math_Grade+Science_Grade+English_Grade)/3


print('Average score of {} is {:.2f}'.format(Name, Average))


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS