0% found this document useful (0 votes)
17 views2 pages

Python Program for Average Marks Calculation

The document contains a Python program that calculates the total, average, and percentage of marks from five subjects, as well as the area and circumference of a circle based on the radius input by the user. It also includes a list of answers to multiple-choice questions. The program utilizes basic mathematical operations and the math module for calculations.

Uploaded by

It’s Sahil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Python Program for Average Marks Calculation

The document contains a Python program that calculates the total, average, and percentage of marks from five subjects, as well as the area and circumference of a circle based on the radius input by the user. It also includes a list of answers to multiple-choice questions. The program utilizes basic mathematical operations and the math module for calculations.

Uploaded by

It’s Sahil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Average marks python program

#Read marks of all five subjects


print(“Enter marks of five subjects: “)
S1=float(input())
S2=float(input())
S3=float(input())
S4=float(input())
S5=float(input())

#Calculate total, average and percentage one by one


total = S1 + S2 + S3 + S4 + S5;
average = total/5.0;
percentage = (total / 500.0) * 100;

#Print the result


print(“Total marks = “, total)
print(“Average marks = “, average)
print(“Percentage = “, percentage)

Calculating circumference and


area of circle
# Finding area and circumference

# importing math module for PI


import math

# Reading temperature in Celsius


radius = float(input('Enter radius of circle: '))

# Calculating area and circumference


area = [Link] * radius ** 2
circumference = 2 * [Link] * radius

# Displaying output
print('Area = %0.4f.' % (area))
print('Circumference = %0.4f.' % (circumference))
MCQs Answers
1. C) Both of the above
2. A) [ ‘w’, ‘e’, ‘I’, ‘c’, ‘o’, ‘m’, ‘e’]
3. A) 7
4. A) Zee
5. D) Error
6. A) 1591
7. A) True
8. D) 6
9. D) Error
10. D) []

You might also like