0% found this document useful (0 votes)
19 views

Average Marks Python Program

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)
19 views

Average Marks Python Program

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
You are on page 1/ 2

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 = math.pi * radius ** 2
circumference = 2 * math.pi * 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