0% found this document useful (0 votes)
41 views5 pages

Python Task 3

Uploaded by

Deepak S
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)
41 views5 pages

Python Task 3

Uploaded by

Deepak S
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/ 5

l) test.py - C:\Users\babua\OneDrive\Desktop\testpy (3.9.13) D X l) IDLE Shell 3.9.

13 D X
File Edit Format Run Options Window Help File Shell Debug Options Window Help
Edit
t e xe r c i se 1 • Python 3 . 9.13 (tag s / v3. 9 . 13:6de2ca5, May 17 2022, 1 6 : 36 : 42 ) [MSC v . 1929 64 bit (A •
a=int (inpu t ( "enter the number " )) MD64) ] on win32
if (a=l) : Type "help" , "copyrigh t", "credit s " o r " l i ce nse () " f or mo re info rma t i on.
print (" January" ) »>
e lif (a=2 ) : - - - - - - RE START : C: \Use r s\babua\OneDr i ve\Desktop \tes t . py - - - - - -
print (" February" ) enter the number : 5
elif (a==3) : May
print ("March" ) >>> I
elif (a=:4) :
print (" April" )
e lif (a:::=5) :
print ("May " )
elif (a==6 ) :
print (" June" )
elif (a :::7):
print (" July" )
elif (a==S):
print (" August" )
•lif <•==9):
print <" September" )
elif (a==lO):
print ("Octo ber" )
elif (a ==ll):
print ("No vember" )
e lif (a =:ai:12):
print (" Dec efl\ber" )
t!lse :
print (" invalid number" )

Ln: 2 Col: 35 Ln: 7 Col: 4

....~ ur c
- Bew0lkt II Q Search
l) test.py - C:\Users\ba bua\OneDrive\Desktop\testpy (3.9.13) D X ~ IDU Shell 3.9.13 D X
File Edit Format Run Options Window Help File Edit Shell Debug Options Windo w Help
n=int (input ( "ent er t.he a ge : " ) ) Python 3. 9 . 13 (cag s / v 3 . 9 . 13 : 6de2ca 5 , May 17 2022, 1 6 : 36 : 42) (MSC v . 1929 64 bi t ( •
if (n<=16 ) : AMD6 4 ) ] on -...in32
print ("yo u r tic ket cost i s 3" ) Type "hel p", "copyr i ghc", " c r edi ts " o r "license () " f o r more information .
elif (n>=60 ) : »>
print (" your cicke t c ost is 2" ) - - - - - - RESTART: C: \Use r s\babua \OneDr ive\Oesktop\tes t . py - - - - - -
e lse : encer che age : 65
print ("yo u r cic ke t cost is 6" ) your c icket cost is : 2
»>

Ln:2 Col: Ln:7 Cot: 4 -


II Q Search 0 0 Ill 11 rzsl ENG


IN "-"' ~•>) ID 20-03-~~ ~~ fD
l) test.py - C:\Users\babua\OneDrive\Deslctop\testpy (3.9.13) D X I) IDlf Shell 3.9.13 D X
File Format
Edit Run ow
_n_s_ W_m_d_
i ,o
Op_ He
__ p
_l ~ -- - - - -- - - - - - - - - File Edit Shell Debug Options= W ;nd
- -,., w H
c -o-c--c_e~lp-,-------cc=-c=c---=--::-:,---;-::-:--:,-,:-::--- =
lexercise 3 • Python 3.9 .13 (tags/v3. 9 .13 : 6de2ca5, May 17 2022 , 16 : 36 : 42 ) [MSC v 1929 64 bit ( •
n=float (input ( " enter the weight ") ) AMD64 I J on win32
m=float (input ( "enter the heigh't : " )) Type "help", " copyright", " credits" or " license () " f o r mo re informa-cion.
bmi=n/ (m*m) »>
print ( " bmi = " ,bmi)
if (bmi<l8 . 5) :
= =====-
enc.er t.he weight : 76
RESTART: C: \Osers\babua \OneDrive\Desk-cop\test .py --~==
print ( "you are in "underweight ' range" ) enter the height : 1 . 82
elif (bmi>""'l8. 5 t bmi<•24. 9) : bmi = 22. 944 088878154812
print ( "you are in ' normal ' range" ) you are i n ' norm.al ' range
elif (bmi>=25 bmi<•29. 9 ): >» I
print ( "you are in ' ov erweigh't • range" )
elif (bmi>=30):
prin-c ( "you are in 'obese ' range" )

ln: 5 Col: 19 ln:9 Col: 4


,...., 1o·c
- BewOlkt
II Q Search
•=O1.. o o ID i1 rzg @
l) test.py - C:\Users\babua\OneDrive\Deslctop\tesLpy (3.9.13) - D X l) IDLE Shell 3.9.13 - D X
File Edit
#exercise 4
Format Run

foe i in range ( 9 , -1 , -1) :


Options Wmdow Help
. File

AMD64) I on
Edit

win32
Shell Window Help
Debug Options
---
Python 3.9.13 (tags/v3 . 9 .13: 6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit ( .
print (i) Type "help", "copyright ", "credits" o r "license()" f or more information.
»>

9
RESTART: C : \Users\babua \OneDrive\Desktop\ test . py ----===
8
7
6
5
4
3
2
1
0
»>

ln:2 Col:23
. .
Ln: 15 Col:4

,--., 1o·c
- BewOlkt
II Q Search
•=O
1.. o o ID ra rzSJ r®l
l) test.py - C:\Users\babua\OneDrive\Desktop\testpy (3.9.13) D X l} IDLE Shell 3.9.13 D X
File Edit Format Run Options Window Help File Edit Shell Debug Options Window Help
#exercise 5 Python 3.9 . 13 (tags/v3 . 9 .13 : 6de2ca 5 , May 17 2022, 1 6: 36 :42 ) [MSC v.1929 6 4 bit (
n=int{ input {"e nte r the numbe r o f r OTJ " )) AMD64) ] on win32
for i in range (0 , n) : Type "help", "copyrigh t", "credits" o r "license() " for more i nforma t i on .
for j in range (O,i+l) : »>
print (" * " , end= "" ) - - - - - - RESTART : C : \ Us e r s\ba bua \OneDrive\Desktop\test .py - - - - - -
print ( ' \r ' ) enter the number o f row 6

»> I

ln:3 Col: 11 Ln: 12 Col

ENG
r ...... 9 "(
- Bew61kt Q Search 0 0 Ill 11 r2SI IN

You might also like