Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Generate a Progress Report | Automating Classroom Tasks
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Teachers

bookChallenge: Generate a Progress Report

Progress reports help teachers communicate student performance. In this challenge, you'll generate a text report summarizing each student's grades.

Oppgave

Swipe to start coding

Write a Python script that creates a text file containing each student's name and average grade.

  • For each student in the students list, calculate the average of the values in the grades list.
  • If a student has no grades, use 0 as their average grade.
  • Write a line for each student in the text file specified by filename, formatted as: Student: {name}, Average Grade: {average}.
  • The average grade should be shown with two decimal places.

Løsning

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 3. Kapittel 5
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:

Can you show me an example of the student data?

What format should the final report be in?

How detailed should each student's summary be?

close

bookChallenge: Generate a Progress Report

Sveip for å vise menyen

Progress reports help teachers communicate student performance. In this challenge, you'll generate a text report summarizing each student's grades.

Oppgave

Swipe to start coding

Write a Python script that creates a text file containing each student's name and average grade.

  • For each student in the students list, calculate the average of the values in the grades list.
  • If a student has no grades, use 0 as their average grade.
  • Write a line for each student in the text file specified by filename, formatted as: Student: {name}, Average Grade: {average}.
  • The average grade should be shown with two decimal places.

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 3. Kapittel 5
single

single

some-alt