Can someone help me understand this stack diagram? /u/Rude_Signal1614 Python Education

I am trying to understand this stack diagram. I have the answers, but i just don’t seem to grasp the process of creating it. For instance, I don’t know where the value for “z” in function “b” comes from.

Can anyone help?

def b(z): prod = a(z, z) print(z, prod) return prod def a(x, y): x = x + 1 return x * y def c(x, y, z): total = x + y + z square = b(total) ** 2 return square x = 1 y = x + 1 print(c(x, y + 3, x + y)) 

Stack diagram solution

submitted by /u/Rude_Signal1614
[link] [comments]

​r/learnpython I am trying to understand this stack diagram. I have the answers, but i just don’t seem to grasp the process of creating it. For instance, I don’t know where the value for “z” in function “b” comes from. Can anyone help? def b(z): prod = a(z, z) print(z, prod) return prod def a(x, y): x = x + 1 return x * y def c(x, y, z): total = x + y + z square = b(total) ** 2 return square x = 1 y = x + 1 print(c(x, y + 3, x + y)) Stack diagram solution submitted by /u/Rude_Signal1614 [link] [comments] 

I am trying to understand this stack diagram. I have the answers, but i just don’t seem to grasp the process of creating it. For instance, I don’t know where the value for “z” in function “b” comes from.

Can anyone help?

def b(z): prod = a(z, z) print(z, prod) return prod def a(x, y): x = x + 1 return x * y def c(x, y, z): total = x + y + z square = b(total) ** 2 return square x = 1 y = x + 1 print(c(x, y + 3, x + y)) 

Stack diagram solution

submitted by /u/Rude_Signal1614
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *