QuestionQ110

VerifiedSDN and automation basics

You define the following function in Python:

def add(a, b, c)  
return a + b + c  

You then add the following code. To ensure the code executes correctly, arrange the code in sequence.

Drag & Drop
1
2
3
4
Explanation

Python evaluates assignments in order. b depends on a, c depends on both values, and print(add(a,b,c)) must occur only after all three variables have been assigned.

Community Discussion

No comments yet. Be the first to start the discussion!