0% found this document useful (0 votes)
11 views1 page

Practice Questions

The document outlines an assignment with three programming tasks in Python. The first task involves calculating the area and circumference of a circle, the second task is to create a 'Guess the Number' game, and the third task requires developing a program to calculate final grades for students based on their scores. The third task specifies the use of functions for calculations, including average assignment scores and course grades, along with user input for student data.

Uploaded by

Misha Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Practice Questions

The document outlines an assignment with three programming tasks in Python. The first task involves calculating the area and circumference of a circle, the second task is to create a 'Guess the Number' game, and the third task requires developing a program to calculate final grades for students based on their scores. The third task specifies the use of functions for calculations, including average assignment scores and course grades, along with user input for student data.

Uploaded by

Misha Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT 4

CLO-5
Question 1: Write a python program to calculate area and circumference of circle
Question 2: Write a program for a simple Python game called "Guess the Number". In this
game, the computer generates a random number between 1 and 100, and the player has to
guess the number. After each guess, the computer provides feedback on whether the guess
was too high or too low. The game continues until the player guesses the correct number.
Question 3: You are tasked with creating a Python program that calculates the final grades for
a class of students based on their individual scores in different assignments and exams. The
program should use functions to perform the necessary calculations. The program should have
the following requirements:
1. The program should prompt the user to enter the total number of students in the class.
2. For each student, the program should ask for their name, followed by their scores on
three assignments (out of 100), a midterm exam (out of 100), and a final exam (out of
100).
3. The program should calculate the average assignment score for each student by taking
the average of the three assignment scores.
4. The program should calculate the overall course grade for each student using the
following weights: assignments (25%), midterm exam (25%), and final exam (50%).
5. The program should display the final course grade (out of 100) for each student.
6. Your task is to implement this program using Python and functions. Write the code for
the program and ensure that it fulfills the given requirements.

Your solution should include:

A function called average_assignment_score that takes three assignment scores as


parameters and returns the average score.
A function called calculate_course_grade that takes the average assignment score, the
midterm exam score, and the final exam score as parameters. It calculates and returns the final
course grade based on the provided weights.
A function called calculate_grades that prompts the user for the number of students, their
names, and scores, and displays the final course grade for each student.

You might also like