Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Calculate Class Attendance | Getting Started with Python for the Classroom
Python for Teachers
Osio 1. Luku 7
single

single

bookChallenge: Calculate Class Attendance

Pyyhkäise näyttääksesi valikon

Keeping track of attendance is a common classroom task. In this challenge, you'll use a list of attendance counts to calculate the total and average attendance.

Tehtävä

Swipe to start coding

Write a Python script that takes a list of attendance numbers for each student, calculates the total and average attendance, and prints the results.

  • Calculate the sum of all values in attendance_list.
  • Calculate the average attendance by dividing the total by the number of students in attendance_list.
  • Print the total attendance.
  • Print the average attendance.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 7
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

some-alt