Ask Question
10 July, 11:45

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

+2
Answers (1)
  1. 10 July, 13:26
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers