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

Py Assign3

Uploaded by

Omkar Kumbhar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Py Assign3

Uploaded by

Omkar Kumbhar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

AssiLogialoperatoos,

pmanent
Page No

-3
Tle: Cooelitianal
Bthen
Statemesss.
Qbietives:
.To hälerstano RthonlooiceJcpsatocs.
R Dnderstang to sking ol ondit ionc Shtement
in python.
*poblem Sictemeat i
To ooeph stucdent's five CouYses Marks ed
Com pte his]hes jesult. stúclend passing
iE helshe esCoxes
maxks equa to cndl
abeve A0 in each CourseTf
io each ourse TE Suclet
a9grê gate qreater the 75%,then
qsade is cistinctian TE aIngegte is 60>E aoo<75
then the qrode is Sisst ali vísisn. IF cqgrate
is 50) and <co, thern the gsace i secochd divisio
*Outomeson ompledior of is assignmert stadents
. Jnclessta nd hepython aperotccs.
2. Undesstunol the cworkingConditicoa
sictemerds in pthen.
Seftuese aocdHotdace eg Leise m
erdsi
Sousce python Prcqram mìnq
ming toals
JikeTupytes Nolebgk.
Concept. -

o his assigoment users he3 o eneter tive dtfeset


masks for five sbjects. Neet, it willLfH the totel
avevaoe , anc Percendaae o? those five Subjets.
My Knowleodog tenk
Date

(Paga No I%

Ale;o cithm
-SBep : Stast
-epl2Dccept Subiect masks fiom ser.
step 3it avesage
aVedaqe a as tobal od alluhjats /so-ofsubied
ompede
Step aiCheck if avarage is qfader thes equsd to 75, display
q6ade ag distinctian.
Gtep Sicheck if avescge is between so 275, olisplay gade as fis
Step cchek if aeage is betaen SoLso oisplay qsacea stan
Step 7:Check ifaeSage is beteucen HoR So, olisplauy qrade as thisol
Btep &: eek i nont f aboveConditioo Madch display
seult s'fail!"
-Step I: Enl
ocochest (Stast

lompude &ungAerae

Distinctian
prin
poat"irst

/Pciod 'srod

nynotss
My Knowiedgo bank
Date
Page No 19

(onelusio0 -
Fence e bat lpacoeel the Dython logid
operstors ancl Cencltjcnal stetemerts.Thu we
bave pertoxmed hot to Caleulate pecentege and
*pToblersooleith Sample ocdpet
To obeilate ogre qode aod qace.
print C"Eoter the macks in Englisa)
print CSates he marks io Mthenedics"):
Tmasks2peAt-ht Cinpud)
printFoler' e 2sk io Science
matk it Cinput C)
print C" Ender the mmngks in Sbriclstucies:);
masks 4: int Cinput c)
point Cater the marks in Gmpuder Geiene

toto):loat mosks) mosks 2 t onasks t


musks + meks s)
avg totos
psat " The d¡gseaate masks are: "

marksgA0
elif Cayg 75)
poit Gsaale: DistinchioI
Mnynted
My Knowtedga bank
Date:

(Page No : 20

eli
el:sC psint
avg<rs):
Gsade i First Divsioo )
So anc are <so)
LeliE'a): 4ao and avg so).:
pint C" Gcaale : Thivel Diisioa Cposss )
else
pint "Ee)

Enterhe maxks ia Engish


Fotey the mask io

Enderhe marks in. Siencee


Entes the Maskijn Socia) Stuakes
Fnter the matks in Computer Science:

The ctagregae
ak morks
marks ase 86:0

mynotes
My Knowladge bank

My Knowledge bank
(21

[1]: print ("Enter the marks in


English: ")
marksl=int (input ())
print("Enter the marks in Mathematics: ")
marks2=int(input () )
print("Enter the marks in Science: ")
marks3=int(input() )
print( "Enter the marks in Social Studies: ")
marks4=int (input() )
print("Enter the marks in Computer Science: ")
marks5=int(input ())
total=float (marksl+marks2+marks3+marks4+marks5)
avg=total/5
print("The aggregate marks are: ",avg)
1f(mapkZl«40 or marks2<40 or marks3<40 or marks4<40 or marks5<40 ):
print("Fail")#minimum requi rement for pasS1ng
elif (avg>=75):
print("Grade: Distinction")
elif (avg »=60 and avg<75):
print("Grade: First Division" )
elif (avg>=50 and avg<60):
print("Grade:Second Division")
elif (avg>=40 and avg<50):
print("Grade: Third Division (pass)")
else:
priptt"Fail")
Enter the marks in English:
90
Enter the marks in Mathematics:
60
Enter the marks in Science:
80
Enter the marks in Social Studies:
85
Enter the marks in Computer Science:
95
82.0
The aggregate marks are:
Grade:Distinction

You might also like