forked from ak79235/Python_Chapter-3
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram 3_14-Program to calulate result.py
More file actions
28 lines (27 loc) · 1.26 KB
/
Program 3_14-Program to calulate result.py
File metadata and controls
28 lines (27 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 16:20:18 2020
@author: ak792
"""
# Write a program to calculate a student's result based on two examinations, 1
# sport event, and 3 activities conducted. The weightage of activities = 30 per
# cent, sports = 20 per cent, and examination = 50 per cent.
print("Calculations of marks of a student.\n\n\n")
exam1 = int(input("Enter marks in first examination:"))
exam2 = int(input("Enter marks in second examination:"))
sport_event = int(input("Enter marks in sport event:"))
activity1 = int(input("Enter marks in activity 1:"))
activity2 = int(input("Enter marks in activity 2:"))
activity3 = int(input("Enter marks in activity 3:"))
exam_total = exam1 + exam2
activity_total = activity1 + activity2 + activity3
activity_percentage = (activity_total / 300) * 30
sports_percentage = (sport_event / 100) * 20
exam_percentage = (exam_total/200)*50
print("**********************RESULT**********************")
print("Marks(%) in examinations = " + str(exam_percentage))
print("Marks(%) in sports = " + str(sports_percentage))
print("Marks(%) in activities = " + str(activity_percentage))
print("--------------------------------------------------")
print("Total marks = " + str(exam_percentage + sports_percentage + activity_percentage))
input()