Function 2 Code Answer the following questions with your partner: 1 a = "man" 2 b = "woman" 3 4 def Combine (person): 5 6 1. What is the name of the function? 2. What are the global variables? 3. What are the local variables? 4. What are the arguments? 5. What are the parameters? 6. What does the function return? animal_1 = "cat" animal_2 = "bat" C = animal_1 + person return c %3D 8 9. 10 Combine(a)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 9SA
icon
Related questions
Question
Please help
Function 2
Code
Answer the following questions with
your partner:
1 a = "man"
2 b = "woman"
3
1. What is the name of the
4 def Combine (person):
animal_1 = "cat"
animal_2 = "bat"
C = animal_1 + person
function?
2. What are the global variables?
3. What are the local variables?
4. What are the arguments?
5. What are the parameters?
%3!
7
return c
9.
10 Combine(a)
6. What does the function return?
Function 3
Code
Answer the following questions with
your partner:
1 a = "wif"
2 b = "wer"
%3D
1. What is the name of the
function?
4 def Sum (c,d):
e = "man"
h = d + e
2. What are the global variables?
3. What are the local variables?
4. What are the arguments?
5. What are the parameters?
6. What does the function return?
6
7
return h
9 Sum (a,b)
10
11 print (Sum(a,b))
Transcribed Image Text:Function 2 Code Answer the following questions with your partner: 1 a = "man" 2 b = "woman" 3 1. What is the name of the 4 def Combine (person): animal_1 = "cat" animal_2 = "bat" C = animal_1 + person function? 2. What are the global variables? 3. What are the local variables? 4. What are the arguments? 5. What are the parameters? %3! 7 return c 9. 10 Combine(a) 6. What does the function return? Function 3 Code Answer the following questions with your partner: 1 a = "wif" 2 b = "wer" %3D 1. What is the name of the function? 4 def Sum (c,d): e = "man" h = d + e 2. What are the global variables? 3. What are the local variables? 4. What are the arguments? 5. What are the parameters? 6. What does the function return? 6 7 return h 9 Sum (a,b) 10 11 print (Sum(a,b))
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Hyperlinks
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning