-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunction_P6.py
More file actions
30 lines (30 loc) · 1.06 KB
/
Function_P6.py
File metadata and controls
30 lines (30 loc) · 1.06 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
29
30
print("\n\t\t\tFunctions")
print("\t\t\t---------")
print("\n\nSTUDENT DETAILS")
print("---------------")
def studinfo():
global sname,sid,cname,dept,cpp,dd,php;
sname= input("\nEnter the student name : ")
sid=int(input("Enter the register number : "))
cname= input("Enter the class name : ")
cpp=int(input("Enter the C++ mark : "))
dd=int(input("Enter the DD mark : "))
php=int(input("Enter the PHP mark : "))
def calc():
global total,average
total=cpp+dd+php
average=total/3
def display():
print("\n\n\t\t\tSTUDENT MARK DETAILS")
print("\t\t\t--------------------")
print("\tStudent name : ",sname)
print("\tRegister No. : ",sid)
print("\tClass name : ",cname)
print("\tC++ Mark : ",cpp)
print("\tDD Mark : ",dd)
print("\tPHP Mark : ",php)
print("\tTotal : ",total)
print("\tAverage : ",average)
studinfo( )
calc( )
display( )