Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære 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.

Oppgave

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.

Løsning

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 7
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

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

Sveip for å vise menyen

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.

Oppgave

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.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 7
single

single

some-alt