# Program scores2.py
# ============================================================
def is_float(s):
    """ Returns True if string is a number. """
    try:
        float(s)
        return True
    except ValueError:
        return False
# ------------------------------------------------------------
def is_int(s):
    """ Returns True if string is a number. """
    try:
        int(s)
        return True
    except ValueError:
        return False
# ------------------------------------------------------------
def getinteger(Message):
   myInteger =input(Message)
   if is_int(myInteger):
        width = int(myInteger)
   else:
        print("This was not an int.")
        print("Program Terminates in getInteger.")
        exit(-1)
   return myInteger
# ------------------------------------------------------------
def getfloat(Message):
   myFloat =input(Message)
   if is_float(myFloat):
        myFloat = float(myFloat)
   else:
        print("This was not an float.")
        print("Program Terminates in getFloat.")
        exit(-1)
   return myFloat
# ------------------------------------------------------------
def getScores(numberOfScores):
    counter = 0
    scores = []
    while(counter < numberOfScores):
        myScore = getfloat("Enter the next exam score ")
    #    print(type(myScore))
        scores.append(myScore)
        print(counter,scores)
        counter = counter + 1

    return scores
# ------------------------------------------------------------
def getScoreAverage(scores):
    sumOfScores = 0
    for dummy in scores:
        sumOfScores = sumOfScores + dummy

    averageScore = sumOfScores/len(scores)
    return averageScore

# ============================================================

# Input 5 float scores from the keyboard and put them in a list.

scores = [98, 87, 92, 96, 100]

averageScore = getScoreAverage(scores)

print(f"Average Score is {averageScore:.2f}")
