SlideShare a Scribd company logo
Q1a. Is it mandatory for all functions to have a return statement? Q1b. If you do not specify a
return statement in a function, what is returned by the function at the end of its execution flow?
Q1c. Explain why the values of the variables a and b (as printed at the end of the execution) are 2
and 40 respectively. def doSomething (a):b=5c=ba return c def doSomethingToo (): global a
global bb=baa=2b=10b+= doSomething(a) doSomethingToo() print (f"a={a}nb={b})

More Related Content

More from altajhaji20

Q3 35000 Points The diagram on the left represents a quiescent center.pdf
 Q3 35000 Points The diagram on the left represents a quiescent center.pdf Q3 35000 Points The diagram on the left represents a quiescent center.pdf
Q3 35000 Points The diagram on the left represents a quiescent center.pdfaltajhaji20
 
Q2.21. Which of the following statements about intraspecific competit.pdf
 Q2.21. Which of the following statements about intraspecific competit.pdf Q2.21. Which of the following statements about intraspecific competit.pdf
Q2.21. Which of the following statements about intraspecific competit.pdfaltajhaji20
 
Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdf
 Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdf Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdf
Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdfaltajhaji20
 
Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdf
 Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdf Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdf
Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdfaltajhaji20
 
Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdf
 Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdf Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdf
Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdfaltajhaji20
 
Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdf
 Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdf Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdf
Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdfaltajhaji20
 
Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdf
 Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdf Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdf
Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdfaltajhaji20
 
Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdf
 Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdf Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdf
Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdfaltajhaji20
 
Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdf
 Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdf Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdf
Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdfaltajhaji20
 
Q12 electron acceptor 15 Points What is the terminal electron accep.pdf
 Q12 electron acceptor 15 Points What is the terminal electron accep.pdf Q12 electron acceptor 15 Points What is the terminal electron accep.pdf
Q12 electron acceptor 15 Points What is the terminal electron accep.pdfaltajhaji20
 
Q2 A discrete probability distribution is given by the table i) Find.pdf
 Q2 A discrete probability distribution is given by the table i) Find.pdf Q2 A discrete probability distribution is given by the table i) Find.pdf
Q2 A discrete probability distribution is given by the table i) Find.pdfaltajhaji20
 
Q1. (1)What are the four principles to design an efficient and ef.pdf
 Q1. (1)What are the four principles to design an efficient and ef.pdf Q1. (1)What are the four principles to design an efficient and ef.pdf
Q1. (1)What are the four principles to design an efficient and ef.pdfaltajhaji20
 
Q1. Write a program that has an double array intArray[] that has .pdf
 Q1. Write a program that has an double array intArray[] that has .pdf Q1. Write a program that has an double array intArray[] that has .pdf
Q1. Write a program that has an double array intArray[] that has .pdfaltajhaji20
 
Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdf
 Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdf Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdf
Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdfaltajhaji20
 
Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of be N(0,1).pdf
 Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of  be N(0,1).pdf Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of  be N(0,1).pdf
Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of be N(0,1).pdfaltajhaji20
 
Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdf
 Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdf Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdf
Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdfaltajhaji20
 
Q. You have instance variable as name, age, id. And you have two memb.pdf
 Q. You have instance variable as name, age, id. And you have two memb.pdf Q. You have instance variable as name, age, id. And you have two memb.pdf
Q. You have instance variable as name, age, id. And you have two memb.pdfaltajhaji20
 
Q Presented below is information related to ABC Company. [[ A. Pre.pdf
 Q Presented below is information related to ABC Company. [[ A. Pre.pdf Q Presented below is information related to ABC Company. [[ A. Pre.pdf
Q Presented below is information related to ABC Company. [[ A. Pre.pdfaltajhaji20
 
Q.2 Allegro Company has gathered the following information. Require.pdf
 Q.2 Allegro Company has gathered the following information.  Require.pdf Q.2 Allegro Company has gathered the following information.  Require.pdf
Q.2 Allegro Company has gathered the following information. Require.pdfaltajhaji20
 
public class weird { public static void main(String[] args){ int nu.pdf
 public class weird { public static void main(String[] args){ int nu.pdf public class weird { public static void main(String[] args){ int nu.pdf
public class weird { public static void main(String[] args){ int nu.pdfaltajhaji20
 

More from altajhaji20 (20)

Q3 35000 Points The diagram on the left represents a quiescent center.pdf
 Q3 35000 Points The diagram on the left represents a quiescent center.pdf Q3 35000 Points The diagram on the left represents a quiescent center.pdf
Q3 35000 Points The diagram on the left represents a quiescent center.pdf
 
Q2.21. Which of the following statements about intraspecific competit.pdf
 Q2.21. Which of the following statements about intraspecific competit.pdf Q2.21. Which of the following statements about intraspecific competit.pdf
Q2.21. Which of the following statements about intraspecific competit.pdf
 
Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdf
 Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdf Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdf
Q2.1 11000 Points The cloudy (cdy) recessive mutation causes seedling.pdf
 
Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdf
 Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdf Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdf
Q25 dominance 15 Points B is an allele that makes frogs green, whil.pdf
 
Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdf
 Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdf Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdf
Q2. Match the graphs with their descriptions. DAG [ Choose ] a graph .pdf
 
Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdf
 Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdf Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdf
Q2. (10 Points) Indirect Addressing Mode Instruction 002D J@ RETADR 3.pdf
 
Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdf
 Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdf Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdf
Q19 Glycolaldehyde 15 Points Glycolaldehyde inhibits the Calvin cyc.pdf
 
Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdf
 Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdf Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdf
Q2 (10 points). Regarding SVB banks failure, please list at least tw.pdf
 
Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdf
 Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdf Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdf
Q2 The repair and maintenance cost of a machine is $50,000 per yea.pdf
 
Q12 electron acceptor 15 Points What is the terminal electron accep.pdf
 Q12 electron acceptor 15 Points What is the terminal electron accep.pdf Q12 electron acceptor 15 Points What is the terminal electron accep.pdf
Q12 electron acceptor 15 Points What is the terminal electron accep.pdf
 
Q2 A discrete probability distribution is given by the table i) Find.pdf
 Q2 A discrete probability distribution is given by the table i) Find.pdf Q2 A discrete probability distribution is given by the table i) Find.pdf
Q2 A discrete probability distribution is given by the table i) Find.pdf
 
Q1. (1)What are the four principles to design an efficient and ef.pdf
 Q1. (1)What are the four principles to design an efficient and ef.pdf Q1. (1)What are the four principles to design an efficient and ef.pdf
Q1. (1)What are the four principles to design an efficient and ef.pdf
 
Q1. Write a program that has an double array intArray[] that has .pdf
 Q1. Write a program that has an double array intArray[] that has .pdf Q1. Write a program that has an double array intArray[] that has .pdf
Q1. Write a program that has an double array intArray[] that has .pdf
 
Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdf
 Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdf Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdf
Q1 - Medical Diagnostic Database [30 points] You are given a file con.pdf
 
Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of be N(0,1).pdf
 Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of  be N(0,1).pdf Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of  be N(0,1).pdf
Q.6 Let (X1,X2X3�,Xn)N(,1) and let prior distribution of be N(0,1).pdf
 
Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdf
 Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdf Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdf
Q.3 L& A Infrastructure Ltd (L&A), a listed company seeks to acqu.pdf
 
Q. You have instance variable as name, age, id. And you have two memb.pdf
 Q. You have instance variable as name, age, id. And you have two memb.pdf Q. You have instance variable as name, age, id. And you have two memb.pdf
Q. You have instance variable as name, age, id. And you have two memb.pdf
 
Q Presented below is information related to ABC Company. [[ A. Pre.pdf
 Q Presented below is information related to ABC Company. [[ A. Pre.pdf Q Presented below is information related to ABC Company. [[ A. Pre.pdf
Q Presented below is information related to ABC Company. [[ A. Pre.pdf
 
Q.2 Allegro Company has gathered the following information. Require.pdf
 Q.2 Allegro Company has gathered the following information.  Require.pdf Q.2 Allegro Company has gathered the following information.  Require.pdf
Q.2 Allegro Company has gathered the following information. Require.pdf
 
public class weird { public static void main(String[] args){ int nu.pdf
 public class weird { public static void main(String[] args){ int nu.pdf public class weird { public static void main(String[] args){ int nu.pdf
public class weird { public static void main(String[] args){ int nu.pdf
 

Recently uploaded

PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Celine George
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...sanghavirahi2
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersPedroFerreira53928
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptxmansk2
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17Celine George
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticspragatimahajan3
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTechSoup
 

Recently uploaded (20)

PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdfPost Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 

Q1a. Is it mandatory for all functions to have a return statement Q1.pdf

  • 1. Q1a. Is it mandatory for all functions to have a return statement? Q1b. If you do not specify a return statement in a function, what is returned by the function at the end of its execution flow? Q1c. Explain why the values of the variables a and b (as printed at the end of the execution) are 2 and 40 respectively. def doSomething (a):b=5c=ba return c def doSomethingToo (): global a global bb=baa=2b=10b+= doSomething(a) doSomethingToo() print (f"a={a}nb={b})