Ask Question
14 September, 17:19

What will be the output after the following code is executed?

def pass_it (x, y):

z = x + ", " + y

return (z)

name2 = "Tony"

name1 = "Gaddis"

fullname = pass_it (name1, name2)

print (fullname)

A) Tony Gaddis

B) Gaddis Tony

C) Tony, Gaddis

D) Gaddis, Tony

+5
Answers (1)
  1. 14 September, 20:58
    0
    D) Gaddis, Tony

    Explanation:

    - When you look at the function pass_it, it takes two arguments and returns these arguments with a comma between them.

    - name1 and name2 variables are assigned as Gaddis and Tony.

    fullname variable calls the the pass_it and gives above variables as arguments.

    fullname variable (which is now equal to Gaddis, Tony) is printed.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What will be the output after the following code is executed? def pass_it (x, y): z = x + ", " + y return (z) name2 = "Tony" name1 = ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers