REST APIs with Flask and Python - Solution to Coding Exercise: Dictionaries and Students

REST APIs with Flask and Python - Solution to Coding Exercise: Dictionaries and Students

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Wayground Content

FREE Resource

This video tutorial guides students through a coding exercise in Python, focusing on creating and modifying dictionary variables and implementing a function to calculate the average grade for a class. The tutorial is divided into three parts: creating a dictionary with specific keys and values, modifying a variable to access dictionary keys, and implementing a function to calculate the average grade. The instructor provides detailed explanations and examples to help students understand the concepts and apply them in their coding exercises.

Read more

3 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

Describe how to calculate the total and count of grades in the student list.

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the significance of using total += sum(student grades) in the code?

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

Why is it important to assign the count variable back after calculating its value?

Evaluate responses using AI:

OFF