Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Calculate Class Attendance | Getting Started with Python for the Classroom
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Teachers

bookChallenge: Calculate Class Attendance

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.

Tâche

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.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 7
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

How do I calculate the total attendance from a list?

How do I find the average attendance using the attendance counts?

Can you show me an example list of attendance counts?

close

bookChallenge: Calculate Class Attendance

Glissez pour afficher le menu

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.

Tâche

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 7
single

single

some-alt