20 likes | 122 Views
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:
E N D
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: 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)