slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
What will the following print out? def doit(value ): value = value + 1 print value, PowerPoint Presentation
Download Presentation
What will the following print out? def doit(value ): value = value + 1 print value,

Loading in 2 Seconds...

play fullscreen
1 / 2

What will the following print out? def doit(value ): value = value + 1 print value, - PowerPoint PPT Presentation


  • 65 Views
  • Uploaded on

5 7 7 5 7 8 6 8 8 6 8 9 (nothing). What will the following print out? def doit(value ): value = value + 1 print value, def main(): x = 5 y = 7 doit(x ) doit(y ) doit(y ) main(). What will the following print out? def doit(number ): if number < 5:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'What will the following print out? def doit(value ): value = value + 1 print value,' - kyria


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

5 7 7

5 7 8

6 8 8

6 8 9

(nothing)

What will the following print out?

def doit(value):

value = value + 1

print value,

def main():

x = 5

y = 7

doit(x)

doit(y)

doit(y)

main()

slide2

What will the following print out?

def doit(number):

if number < 5:

return ‘small’

else:

return ‘big’

def main():

a = doit(4)

b = doit(7)

print a,

print b,

main()

small big

small big small big

a b

a b a b

(nothing)