Saturday, 19 February 2022

Python Program A simple program to average two exam scores

 

CODE

def main() : 

    print ("This program computes the average of two exam scores. ") 

    score1, score2 = eval (input ("Enter two scores separated by a comma: ") ) 

    average = (score1 + score2) / 2 

    print ("The average of the scores is: ", average) 

main()


SCREENSHOT



No comments:

Post a Comment