0% found this document useful (0 votes)
11 views6 pages

Python Basics: Concepts & Problem Solving

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)
11 views6 pages

Python Basics: Concepts & Problem Solving

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

UNI T I — I NT R OD UCT I ON T O P YT H ON & COMP UT A T I ONA L P R OB L E M S OL V I NG

2 -Mar k Quest i ons


1. What i s comput at i onal pr obl emsol vi ng?
2. What ar e t he l i mi t s of comput at i onal pr obl emsol vi ng?
3. D ef i ne an al gor i t hm.
4. What i s t he r ol e of comput er har dwar e i n pr obl emsol vi ng?
5. What i s t he r ol e of comput er sof t war e i n comput at i onal pr obl emsol vi ng?
6. What ar e l i t er al s i n P yt hon?
7. D ef i ne var i abl es and i dent i f i er s.
8. What ar e t he r ul es f or nami ng i dent i f i er s i n P yt hon?
9. L i st any f our basi c dat a t ypes i n P yt hon.
10. What i s t he use of t he i nput () and pr i nt () f unct i ons?
11. What ar e oper at or s? Gi ve exampl es.
12. D ef i ne an expr essi on i n P yt hon.
13. What i s t he di f f er ence bet ween i nt eger and f l oat i ng-poi nt di vi si on i n P yt hon?
14. What i s t ype conver si on?
15. What i s meant by dynami c t ypi ng i n P yt hon?

5 -Mar k Quest i ons


1. E xpl ai n t he essence and l i mi t s of comput at i onal pr obl emsol vi ng.
2. E xpl ai n t he r ol e of comput er al gor i t hms i n comput at i onal pr obl emsol vi ng.
3. D escr i be t he st r uct ur e of a P yt hon pr ogr amwi t h an exampl e.
4. E xpl ai n l i t er al s, var i abl es, and i dent i f i er s wi t h exampl es.
5. E xpl ai n di f f er ent t ypes of oper at or s i n P yt hon.
6. Wr i t e shor t not es on expr essi ons and dat a t ypes i n P yt hon.
7. E xpl ai n t he i nput and out put oper at i ons i n P yt hon.

1 0 -Mar k Quest i ons


1. E xpl ai n i n det ai l t he pr ocess of comput at i onal pr obl emsol vi ng.
2. E xpl ai n t he ar chi t ect ur e of a comput er syst emand i t s r ol e i n pr obl emsol vi ng.
3. D i scuss P yt hon dat a t ypes, var i abl es, oper at or s, and expr essi ons wi t h exampl es.
4. E xpl ai n P yt hon’s i nput and out put oper at i ons wi t h sui t abl e pr ogr ams.
5. Wr i t e a P yt hon pr ogr amt o per f or mbasi c ar i t hmet i c and demonst r at e di f f er ent oper at or s.
UNI T I I — CONT R OL S T R UCT UR E S & D A T A S E QUE NCE S

2 -Mar k Quest i ons


1. What i s a B ool ean expr essi on?
2. What i s t he pur pose of i ndent at i on i n P yt hon?
3. Wr i t e t he synt ax of an i f st at ement .
4. What i s a mul t i -way sel ect i on?
5. D i f f er ent i at e bet ween def i ni t e and i ndef i ni t e l oops.
6. What i s a B ool ean f l ag?
7. What i s an i nf i ni t e l oop?
8. What i s t he di f f er ence bet ween whi l e and f or l oops?
9. What i s a l i st i n P yt hon?
10. What i s a st r i ng i n P yt hon?
11. What i s a di ct i onar y i n P yt hon?
12. What i s a r ange obj ect ?
13. What i s i ndexi ng and sl i ci ng i n P yt hon?
14. H ow ar e el ement s added t o a l i st ?
15. What i s t he use of br eak and cont i nue st at ement s?

5 -Mar k Quest i ons


1. E xpl ai n t he use of sel ect i on st at ement s (i f , i f -el se, i f -el i f -el se) wi t h exampl es.
2. E xpl ai n di f f er ent l oopi ng st r uct ur es i n P yt hon wi t h exampl es.
3. D i scuss t he di f f er ence bet ween def i ni t e and i ndef i ni t e l oops wi t h exampl es.
4. Wr i t e shor t not es on B ool ean expr essi ons and f l ags.
5. E xpl ai n st r i ng mani pul at i on oper at i ons i n P yt hon.
6. E xpl ai n t he use of l i st s and t hei r basi c oper at i ons.
7. E xpl ai n t he concept of r anges and how t hey ar e used i n l oops.

1 0 -Mar k Quest i ons


1. E xpl ai n i n det ai l t he cont r ol st r uct ur es i n P yt hon wi t h sui t abl e exampl es.
2. D i scuss i t er at i on and sel ect i on cont r ol st r uct ur es i n P yt hon.
3. E xpl ai n st r i ng, l i st , and di ct i onar y mani pul at i ons i n P yt hon wi t h exampl es.
4. Wr i t e a P yt hon pr ogr amusi ng l oops and condi t i onal st at ement s t o per f or ma speci f i c t ask (l i ke
f act or i al , pr i me number , et c.).
5. E xpl ai n r anges and t hei r i mpor t ance i n i t er at i on wi t h exampl es.

UNI T I I I — F UNCT I ONS & R E CUR S I ON

2 -Mar k Quest i ons


1. What i s a f unct i on?
2. What i s t he di f f er ence bet ween a val ue-r et ur ni ng and a non-val ue-r et ur ni ng f unct i on?
3. What i s t he pur pose of t he r et ur n st at ement ?
4. D ef i ne par amet er and ar gument .
5. What ar e keywor d ar gument s i n P yt hon?
6. What ar e def aul t ar gument s?
7. What i s var i abl e scope?
8. D ef i ne r ecur si on.
9. What i s a r ecur si ve f unct i on?
10. Gi ve one exampl e of a r ecur si ve pr obl em.
11. What i s t he pur pose of f unct i on modul ar i zat i on?
12. What i s a l ocal var i abl e?
13. What i s a gl obal var i abl e?
14. D ef i ne par amet er passi ng.
15. What i s meant by cal l i ng a f unct i on?

5 -Mar k Quest i ons


1. E xpl ai n t he concept of def i ni ng and cal l i ng f unct i ons i n P yt hon.
2. E xpl ai n par amet er passi ng t echni ques wi t h exampl es.
3. D i scuss keywor d and def aul t ar gument s i n P yt hon wi t h exampl es.
4. E xpl ai n var i abl e scope and l i f et i me wi t h exampl es.
5. E xpl ai n r ecur si ve f unct i ons wi t h exampl es.
6. Wr i t e a pr ogr amt o demonst r at e r ecur si on.

1 0 -Mar k Quest i ons


1. E xpl ai n f unct i ons i n P yt hon — def i ni t i on, i nvocat i on, par amet er s, and r et ur n val ues wi t h
exampl es.
2. E xpl ai n r ecur si on i n det ai l wi t h exampl es and advant ages.
3. Wr i t e a P yt hon pr ogr amusi ng r ecur si ve f unct i on t o f i nd f act or i al or F i bonacci sequence.
4. D i scuss var i abl e scope and par amet er passi ng mechani sms i n det ai l .
5. E xpl ai n t he t ypes of ar gument s suppor t ed i n P yt hon wi t h sui t abl e exampl es.

UNI T I V — OB JE CT S , MOD UL E S & F I L E H A ND L I NG

2 -Mar k Quest i ons


1. What i s an obj ect i n P yt hon?
2. What ar e sof t war e obj ect s?
3. What i s t ur t l e gr aphi cs?
4. Name any t wo t ur t l e gr aphi cs met hods.
5. What i s modul ar desi gn?
6. What i s a P yt hon modul e?
7. What i s t he di f f er ence bet ween a modul e and a package?
8. H ow do you i mpor t a modul e i n P yt hon?
9. What i s t he pur pose of a t ext f i l e?
10. What ar e f i l e modes i n P yt hon?
11. What i s except i on handl i ng?
12. What i s t he use of t he t r y and except st at ement s?
13. What i s t he use of t he f i nal l y bl ock?
14. What i s an except i on obj ect ?
15. What i s t op-down desi gn?

5 -Mar k Quest i ons


1. E xpl ai n t he concept of modul ar desi gn and i t s advant ages.
2. E xpl ai n t he t ur t l e gr aphi cs modul e wi t h an exampl e.
3. Wr i t e shor t not es on P yt hon modul es and how t hey ar e i mpor t ed.
4. E xpl ai n t he pr ocess of openi ng, r eadi ng, and wr i t i ng t ext f i l es i n P yt hon.
5. E xpl ai n except i on handl i ng wi t h t r y, except , and f i nal l y bl ocks.
6. Wr i t e a shor t pr ogr amt o handl e di vi si on by zer o except i on.

1 0 -Mar k Quest i ons


1. E xpl ai n t he concept of modul ar desi gn i n P yt hon and t he use of modul es.
2. D i scuss f i l e handl i ng i n P yt hon wi t h exampl es f or r eadi ng and wr i t i ng t ext f i l es.
3. E xpl ai n except i on handl i ng i n P yt hon i n det ai l wi t h synt ax and exampl es.
4. E xpl ai n t ur t l e gr aphi cs and i t s at t r i but es wi t h exampl es.
5. E xpl ai n t op-down desi gn and modul ar i t y usi ng exampl es.

UNI T V — D I CT I ONA R I E S , S E T S & OOP I N P YT H ON

2 -Mar k Quest i ons


1. What i s a di ct i onar y i n P yt hon?
2. What ar e keys and val ues i n a di ct i onar y?
3. What i s a set i n P yt hon?
4. H ow ar e set s di f f er ent f r oml i st s?
5. What i s encapsul at i on?
6. D ef i ne i nher i t ance.
7. D ef i ne pol ymor phi sm.
8. What i s t he use of t he super () f unct i on?
9. What i s t he pur pose of t he __i ni t __ met hod?
10. What ar e P yt hon packages?
11. What i s NumP y used f or ?
12. What i s pandas used f or ?
13. What i s mat pl ot l i b used f or ?
14. What i s t he di f f er ence bet ween a modul e and a package?
15. What i s met hod over r i di ng?

5 -Mar k Quest i ons


1. E xpl ai n t he di ct i onar y dat a t ype i n P yt hon wi t h exampl es.
2. E xpl ai n set oper at i ons (uni on, i nt er sect i on, di f f er ence) wi t h exampl es.
3. E xpl ai n t he concept of encapsul at i on i n OOP .
4. E xpl ai n i nher i t ance wi t h an exampl e.
5. E xpl ai n pol ymor phi smi n P yt hon.
6. Wr i t e shor t not es on NumP y, pandas, and mat pl ot l i b packages.

1 0 -Mar k Quest i ons


1. E xpl ai n Obj ect -Or i ent ed P r ogr ammi ng i n P yt hon — encapsul at i on, i nher i t ance, and
pol ymor phi smwi t h exampl es.
2. E xpl ai n di ct i onar y and set dat a t ypes i n det ai l wi t h oper at i ons and exampl es.
3. E xpl ai n P yt hon packages and t hei r appl i cat i ons wi t h exampl es of mat pl ot l i b, NumP y, and pandas.
4. Wr i t e pr ogr ams usi ng NumP y ar r ays and mat pl ot l i b f or dat a vi sual i zat i on.
5. E xpl ai n met hod over r i di ng and mul t i pl e i nher i t ance wi t h exampl es.

You might also like