Class Roster Table
Class Roster Table
Write a program with no input that prints a seven-line roster table. Declare, with type hints, three students as name and age pairs: Giselle 21, Bo 19 and Maya 24, plus two column headings, the strings Name and Age, and compute the average age as a typed float (the three ages added, divided by 3). Print the heading row, then a ruler of 14 dashes made with the * operator, then one row per student, then the same ruler, then the words Average age, a colon, a space and the average shown with one decimal using :0.1f. Every row, the heading included, uses the alignment specs {name:<10}{age:>4} in an f-string: the first column left-aligned in 10 characters, the second right-aligned in 4 characters. Input: none.
Expected Output:
Name Age -------------- Giselle 21 Bo 19 Maya 24 -------------- Average age: 21.3
= newline. The output ends with a newline — print one after the last line.
Your Output
Run your code to see the output here...