+ 8

What is this output?

def f(x): y0=x+1 y1=x*3 y2=y0*y1 return(y0,y1,y2) print(f(2)) think x=2 please describe this activity...

29th Nov 2017, 10:17 AM
Kulanga Kaushani
Kulanga Kaushani - avatar
3 Answers
+ 6
answer is 3,6,18
30th Nov 2017, 12:16 PM
Kulanga Kaushani
Kulanga Kaushani - avatar
+ 2
U need to return just y2 if u wanna get 18 I mean
29th Nov 2017, 10:19 AM
stKhaDgar
stKhaDgar - avatar
+ 2
U need to write in the function f(x) something like print(y0, y1, y2)
30th Nov 2017, 12:19 PM
stKhaDgar
stKhaDgar - avatar