Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
6 views
6 pages
APF Exam2
bh
Uploaded by
uranbileg1626
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save APF-exam2 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
6 views
6 pages
APF Exam2
bh
Uploaded by
uranbileg1626
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save APF-exam2 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 6
Search
Fullscreen
© SLRS rarcar a 2 o som nee FY ace tbe ie nt, undonala STARTED ON Yan.” Ap 202, 920A COMETEDON Vincente. 7 A202, 1002 ‘omoe yon eae 10001008) uestion 4 on asus npn re waaay Sor 19 gs Be arr ae Maal es fora coto pe on ie eatsaigito: art elif crisalpta() a pass print (year: “.1) print(“Teo: ")@) Seinput ("vera opyynaxt “) oe fore to Ye eisdigitg elif csalshad) tie else pass print(vesr: "3D print(*Too: °)d) setoput("¥rra opyyna 0 1 See dseigito: elif isalphaQ): asia ” poss print year Prine(Toot seinpu(*vere opyyaaxt on 18OmAr LRN we = Y lit cisaahad else: princvers 3) «.print("Too: *4d) Question 2 reine (input(“Enter amber") or Lin range) prinelayse pipet) eine CAnput"nter ber) ‘for Lin range} wo pede ie d= wet) rine(input(“enter nabers")) Sor Lin ronge( 30) Printing oke"=085) reine (ingu“ester ater") for iin range0): 6 pedneta ed = ats) ueston 5 Pex 26Oumar SY fo ineintinput (“Enter numbers") {for bin cange(n) ao print (str(a)ea) neineinput( Enter umber") fort in range(sa): a pelae(str(oyst) reine Snpue (“Enter uber") For San eange(oet) a” prine(eer(s}) int input( “Enter umbers")) ‘for 3 in range(nt): ao prinetane(a)48) uoston & Se a Ra are are are a AT Ee REN PEO ABTA Stene-[] ford in cage(20,61) str) IF Cane(sfoy a0) one (Ane(st2})82—9) tes. append(s) print" Joun(itens)) stent] ford in ange(20 62): Eeete) FF Gnelatenaa—o) an Gnttane—e) stenscune(3) juncitens)) sprint sxense[) for 2 3 range(t9,61: sate) nesta ‘tens-erten(s) pram 7jein(ttens) and Get(sEA)8—-9} sate) HF Gne( stead) an Cint(sLA 20) ‘ens.cleer() print "ys Join(iters)) Question § eons onyyea y unrag ue sean riya Yea So nr rDNA RUPE Co, 36OH = 0 8 0 msmninein FY bes 1.» input ("¥e3r_opyynax:") ie rin (2, print ¢*3rame*) else: prdne (rar ynary") 1 psn rey) 1 = ingut("Year opyynae:") ane ran Cay sy ey Ve prant(?arwer) else eprint airyynars”) 1 = input ("¥ear_opyynax:") 461 in Ca", 30", '0','y print(*3tunr") aur print *twiryynars") it estan 6 "rons pyre encour ep rsaptoine fees ope ee Tod: a 2 ep cg 0 ae Tc 3 ga ones sp acpi onc aT Eee hage = int(input("input 2 dog's age in human years:")) GP Hage « 2: ‘age = hage * 10.5 else! ‘Lage = (age) * 4 a print("the dog: hage = IntCinput("input 2 dog's age in human years:")) iP hage «2 diage = h age * 10.5 else: Lage = 21 + (hage) * 4 print (“the dog's 2g@ In dogs year 1s",¢ age) ‘age in dog's year is",d_age) age = int input("input 2 dog's age Jn human years:*)) iP hoge eee else age - 21+ (hage - 2) "4 qPrint("the dog's age in dog's year ist d age) age * 10.5 hage = int(input("input a dog's age in human years:")) af Wage Lage ~ hage * 10.5 else: 46OTe OY =D BO samusan peter Question 7 pean rman Graco nacnaae Tn Teer snan oan perp se syantanrcir pe ESSER, Function 4s_even_mun(1) ‘enum = 7] form an 1 Se me Print is even_num([2,2,344,5,6,7,8,9])) ef 5_even_nun(): fern an Se i 0: ‘enum. append(n) retuen enn Prine(is_even_um([1,2.3+44516,7.8:9])) vain 45_even_num(l)t enum =O) form ind: iF ke =0: una eam aPPer(s) 4. print (s_even_num({1,2+3,451647+8,9])) uoeton 8 em def unique 34581): Ba tn iS not in x sc appendta) return x a orintta) eist(D): ail 816OTe OY 4, print uniquelist((1.2,3,3:343+445])) et unique 245¢(1): =U for a int: if @ not in x: x.append() return x print (unique 1550(03,2,3,3,3,3,45D) oF unique tist(2): =O for a in 1 if a not sn x ‘xappend(a) unique 135([1,2.323.3:3+4,5]) ae0 a6
You might also like
500 Python Questions Answers Complex
PDF
No ratings yet
500 Python Questions Answers Complex
214 pages
Sindhi High School Python
PDF
No ratings yet
Sindhi High School Python
25 pages
Anurag Python
PDF
No ratings yet
Anurag Python
69 pages
Python Assignment 3 Ans
PDF
No ratings yet
Python Assignment 3 Ans
19 pages
Python Notes
PDF
No ratings yet
Python Notes
47 pages
PROGRAMS
PDF
No ratings yet
PROGRAMS
75 pages
Python Programs Niyati
PDF
No ratings yet
Python Programs Niyati
15 pages
CS Codes
PDF
No ratings yet
CS Codes
61 pages
Jasmine Practical File IP
PDF
No ratings yet
Jasmine Practical File IP
91 pages
Manalang Steven Allen P. - CodeCompilation
PDF
No ratings yet
Manalang Steven Allen P. - CodeCompilation
34 pages
C Programming Notes
PDF
No ratings yet
C Programming Notes
27 pages
Python Lab File
PDF
No ratings yet
Python Lab File
43 pages
Python Assignment 1
PDF
No ratings yet
Python Assignment 1
6 pages
8 20
PDF
No ratings yet
8 20
12 pages
III B.SC (Python Manual)
PDF
No ratings yet
III B.SC (Python Manual)
36 pages
Python 22616 Solved Manual (Join AICTE Telegram)
PDF
No ratings yet
Python 22616 Solved Manual (Join AICTE Telegram)
76 pages
ECE054 Lab4
PDF
No ratings yet
ECE054 Lab4
8 pages
Computer Holiday Homework
PDF
No ratings yet
Computer Holiday Homework
10 pages
Pythonlabques
PDF
No ratings yet
Pythonlabques
68 pages
Sum of Two Numbers: "Welcome"
PDF
No ratings yet
Sum of Two Numbers: "Welcome"
32 pages
Text
PDF
No ratings yet
Text
10 pages
931 Lab01 ML
PDF
No ratings yet
931 Lab01 ML
5 pages
2018 Nov Sample Solutions
PDF
No ratings yet
2018 Nov Sample Solutions
6 pages
Data Handling
PDF
No ratings yet
Data Handling
13 pages
Parth It File
PDF
No ratings yet
Parth It File
25 pages
Python
PDF
No ratings yet
Python
3 pages
23BDS028 Kshiti A - It1002
PDF
No ratings yet
23BDS028 Kshiti A - It1002
33 pages
Programs Set1
PDF
No ratings yet
Programs Set1
4 pages
Codi
PDF
No ratings yet
Codi
13 pages
Python Codes
PDF
No ratings yet
Python Codes
32 pages
Python 1
PDF
No ratings yet
Python 1
3 pages
MCS-011 Problem Solving and Programming
PDF
No ratings yet
MCS-011 Problem Solving and Programming
13 pages
Python Assignmnent 2
PDF
No ratings yet
Python Assignmnent 2
13 pages
Unit7 Exercise
PDF
No ratings yet
Unit7 Exercise
2 pages
Lab Record Assignments
PDF
No ratings yet
Lab Record Assignments
4 pages
Workshop Questions
PDF
No ratings yet
Workshop Questions
23 pages
Tutorial 1, 2, 3, 4, and 5 by Yusuke Rajbhandari Section B
PDF
No ratings yet
Tutorial 1, 2, 3, 4, and 5 by Yusuke Rajbhandari Section B
25 pages
Python Notes
PDF
No ratings yet
Python Notes
25 pages
CS Record File (By Rahil)
PDF
No ratings yet
CS Record File (By Rahil)
17 pages
Journal N Docs
PDF
No ratings yet
Journal N Docs
8 pages
IT1002 22bsmi01
PDF
No ratings yet
IT1002 22bsmi01
24 pages
PRACTICAL Python 12
PDF
No ratings yet
PRACTICAL Python 12
35 pages
Cs Notes
PDF
No ratings yet
Cs Notes
28 pages
Python Solved Mannual
PDF
No ratings yet
Python Solved Mannual
43 pages
If Else: Enter Num15 Enter Num23 3 Num2 Is Smaller
PDF
No ratings yet
If Else: Enter Num15 Enter Num23 3 Num2 Is Smaller
3 pages
Revision 1 - Python Class 9
PDF
No ratings yet
Revision 1 - Python Class 9
4 pages
Hackathon 1
PDF
No ratings yet
Hackathon 1
8 pages
1.enq Cost 2.deq Cost
PDF
No ratings yet
1.enq Cost 2.deq Cost
10 pages
A Program He Product Al: Produet o
PDF
No ratings yet
A Program He Product Al: Produet o
10 pages
PYTHON
PDF
No ratings yet
PYTHON
19 pages
Python Practical Codes
PDF
No ratings yet
Python Practical Codes
15 pages
Python Project - 240407 - 220903
PDF
No ratings yet
Python Project - 240407 - 220903
15 pages
Python Lab File
PDF
No ratings yet
Python Lab File
21 pages
A.K Khan Movers
PDF
No ratings yet
A.K Khan Movers
18 pages
Python Question Bank
PDF
No ratings yet
Python Question Bank
13 pages
Programs Set2
PDF
No ratings yet
Programs Set2
9 pages
CPS Lab4
PDF
No ratings yet
CPS Lab4
6 pages
MIT6 0001F16 Lec2
PDF
No ratings yet
MIT6 0001F16 Lec2
3 pages
Computer Science HW 1
PDF
No ratings yet
Computer Science HW 1
3 pages