Docsity

Python Programming: Conditional Statements and Loops - Prof. Martine C. Ceberio, Quizzes of Data Structures and Algorithms

Toggle sidebar
bg1
  ! "# %$ &')(+*,(
- .0/21 3
4
, 56 78:9
4
, # ;<=>
?+@ACBDFEHGIB8JLKM@JNPOPEQREMDFJLSUTVNW@PXUXYNCOPEHG@PZMDF[\B]G^D`_
aHOCGb@XcX7JLKHBdTVOPXcXUOe[ScZHf>BhgiB]G^jhSkDLB`D`lemMZMnoJIKHBGLEMZHZHScZHf>JLScpqBTVEHZMjhJLScOPZr_ts!BhJI@PSUXHJLKHBDFJLB`uMDvJIKM@eJwXcB`@Cn
NPOCExJIOJIKHBGIB`DLEHXyJz_
{|r};~eP`}6
5
b
2`e 7]P>
UP\
i
i= 0
i < n
i+ = 1
UP\
7
j= 0
j < i
j+ = 1
]Po!
{|r};~eP`}
5
b
2`e
UP\
i
i= 1
i≤n2
i∗= 5
de¡
¢H£]¤`¥
¤
¦C¦¨§©Mªh«Lª
¡
¢i£`¤]¥
¬¤k®8¯°²±
§
°+³´±
«¶µ
°+·°
«¶µ
°¸°M·°7¹º³¬·»
ª
p(n)
¼

Partial preview of the text

Download Python Programming: Conditional Statements and Loops - Prof. Martine C. Ceberio and more Quizzes Data Structures and Algorithms in PDF only on Docsity!

4 ,^5 6 78:9^4 , # ;< =>

?+@ACB DFEHGIB8JLKM@JNPOPEQREMDFJLSUTVNW@PXUXYNCOPEHG@PZMDF[\B]G^D`_

aHOCGb@XcX7JLKHBdTVOPXcXUOe[ScZHf>BhgiB]G^jhSkDLBDlemMZMnoJIKHBGLEMZHZHScZHf>JLScpqBTVEHZMjhJLScOPZr_ts!BhJI@PSUXHJLKHB DFJLBuMDvJIKM@eJwXcB@Cn NPOCExJIOJIKHB GIB`DLEHXyJz_

{ |r};~eP€‚}„ƒ6 (^5) †b‡ €‚ˆ2‰eŠ ‹Œ7ސ]‘P’“>”•–U—P˜\™^ ‹ –U—P˜\™ŒiŽ i = 0^ •i < n^ •i+ = 1š ‹ Œ7Ž j^ = 0^ •j < i^ • j+ = 1š ]‘P’o› ›!•

{ |r};~eP€‚}œž (^5) †b‡ €‚ˆ2‰eŠ

U—P˜\™

ŒiŽ i^ = 1 •^ i^ ≤^ n

2 •

(^) i∗ = 5š ’dŸe ¡

¢—H£]¤`¥

¦C¦¨§©Mªh«Lª (^) • ’ Ÿ ¡

¢—i£`¤]¥ ‘

˜¬¤k®8¯°²± § °+³´± «¶μ^ °+·° «¶μ^ °¸°M·°7¹º³¬·» ª p(n)