Build a Student Record

Easy ⏱ 8 min 80% acceptance ★★★★★ 4.8
Write a function make_student(name, age, grade) that returns a dictionary with keys "name", "age" and "grade" mapped to the given arguments, in that key order.

Examples

Example 1
Input
make_student('Asha', 21, 'A')
Output
{'name': 'Asha', 'age': 21, 'grade': 'A'}
Explanation

Pack the three arguments into a dict literal.

Constraints

  • Keys must be exactly "name", "age", "grade".

Topics

Dictionariescreation

Companies

TCSInfosysWipro

Hints

Hint 1

A dict literal `{...}` is the simplest way.

Hint 2

Insertion order is preserved in Python 3.7+.

Loading the Python runtime… Run executes your code and shows printed output; Submit checks your function against this problem's examples.