SlideShare a Scribd company logo
(Python)
A variable defined inside a function is a local variable; otherwise, it is a global variable.
If a local variable has the same name as a global variable, the local variable is used inside the
function.
What does this print?
def myFunc1 ():
one = -1
print (one, two)
one = 1
two = 2
print (one, two)
myFunc1 ()
print (one two)

More Related Content

More from NeiltrjGreenez

(rather than herbaceous) in that the sylem often displays secondary gr.pdf
(rather than herbaceous) in that the sylem often displays secondary gr.pdf(rather than herbaceous) in that the sylem often displays secondary gr.pdf
(rather than herbaceous) in that the sylem often displays secondary gr.pdf
NeiltrjGreenez
 
(In java) Create a method to delete a node at a particular position i.pdf
(In java)  Create a method to delete a node at a particular position i.pdf(In java)  Create a method to delete a node at a particular position i.pdf
(In java) Create a method to delete a node at a particular position i.pdf
NeiltrjGreenez
 

More from NeiltrjGreenez (19)

(This task uses Strings-) A program that prompts the user for their pa.pdf
(This task uses Strings-) A program that prompts the user for their pa.pdf(This task uses Strings-) A program that prompts the user for their pa.pdf
(This task uses Strings-) A program that prompts the user for their pa.pdf
 
(rather than herbaceous) in that the sylem often displays secondary gr.pdf
(rather than herbaceous) in that the sylem often displays secondary gr.pdf(rather than herbaceous) in that the sylem often displays secondary gr.pdf
(rather than herbaceous) in that the sylem often displays secondary gr.pdf
 
(Python) Create a function that can take in either a list or a diction.pdf
(Python) Create a function that can take in either a list or a diction.pdf(Python) Create a function that can take in either a list or a diction.pdf
(Python) Create a function that can take in either a list or a diction.pdf
 
(Python) Create a function that prints the number of Keys and Values.pdf
(Python)  Create a function that prints the number of Keys and Values.pdf(Python)  Create a function that prints the number of Keys and Values.pdf
(Python) Create a function that prints the number of Keys and Values.pdf
 
(Pskip)-skip.pdf
(Pskip)-skip.pdf(Pskip)-skip.pdf
(Pskip)-skip.pdf
 
(In C++) In a linked list containing student names (string) and their.pdf
(In C++) In a linked list containing student names (string) and their.pdf(In C++) In a linked list containing student names (string) and their.pdf
(In C++) In a linked list containing student names (string) and their.pdf
 
(Multiple answers) Choose all of the following that are considered ris.pdf
(Multiple answers) Choose all of the following that are considered ris.pdf(Multiple answers) Choose all of the following that are considered ris.pdf
(Multiple answers) Choose all of the following that are considered ris.pdf
 
(Multiple answers) Choose all that are risk factors for CVD- HTN famil.pdf
(Multiple answers) Choose all that are risk factors for CVD- HTN famil.pdf(Multiple answers) Choose all that are risk factors for CVD- HTN famil.pdf
(Multiple answers) Choose all that are risk factors for CVD- HTN famil.pdf
 
(ii) There were 500 insects in the total population- In this populatio.pdf
(ii) There were 500 insects in the total population- In this populatio.pdf(ii) There were 500 insects in the total population- In this populatio.pdf
(ii) There were 500 insects in the total population- In this populatio.pdf
 
(i) When the savings rate is 1-3- what is the fiscal multiplier (you c.pdf
(i) When the savings rate is 1-3- what is the fiscal multiplier (you c.pdf(i) When the savings rate is 1-3- what is the fiscal multiplier (you c.pdf
(i) When the savings rate is 1-3- what is the fiscal multiplier (you c.pdf
 
(In java) Create a method to delete a node at a particular position i.pdf
(In java)  Create a method to delete a node at a particular position i.pdf(In java)  Create a method to delete a node at a particular position i.pdf
(In java) Create a method to delete a node at a particular position i.pdf
 
(Exercise 3-- See pages 24+40 of Interpreting earth History (A manual.pdf
(Exercise 3-- See pages 24+40 of Interpreting earth History (A manual.pdf(Exercise 3-- See pages 24+40 of Interpreting earth History (A manual.pdf
(Exercise 3-- See pages 24+40 of Interpreting earth History (A manual.pdf
 
(D) It identifies if the company will be able to pay its current debts.pdf
(D) It identifies if the company will be able to pay its current debts.pdf(D) It identifies if the company will be able to pay its current debts.pdf
(D) It identifies if the company will be able to pay its current debts.pdf
 
(E) cumulative effect of a change in accounting principle- 1 OF 15 QUE.pdf
(E) cumulative effect of a change in accounting principle- 1 OF 15 QUE.pdf(E) cumulative effect of a change in accounting principle- 1 OF 15 QUE.pdf
(E) cumulative effect of a change in accounting principle- 1 OF 15 QUE.pdf
 
(c) Draw a state machine specifying the operations for a Queue using t (1).pdf
(c) Draw a state machine specifying the operations for a Queue using t (1).pdf(c) Draw a state machine specifying the operations for a Queue using t (1).pdf
(c) Draw a state machine specifying the operations for a Queue using t (1).pdf
 
(d) (2 points) Let X1-X2-X3 be independent identicaly distributed N(0-.pdf
(d) (2 points) Let X1-X2-X3 be independent identicaly distributed N(0-.pdf(d) (2 points) Let X1-X2-X3 be independent identicaly distributed N(0-.pdf
(d) (2 points) Let X1-X2-X3 be independent identicaly distributed N(0-.pdf
 
(CC) SLO2 - Business Opportunity Identification Describe how to -ident.pdf
(CC) SLO2 - Business Opportunity Identification Describe how to -ident.pdf(CC) SLO2 - Business Opportunity Identification Describe how to -ident.pdf
(CC) SLO2 - Business Opportunity Identification Describe how to -ident.pdf
 
(a) -10 marks- When the Central Bank purchases Government bonds held b.pdf
(a) -10 marks- When the Central Bank purchases Government bonds held b.pdf(a) -10 marks- When the Central Bank purchases Government bonds held b.pdf
(a) -10 marks- When the Central Bank purchases Government bonds held b.pdf
 
(25 points) Provide an example of a specific piece of spyware- Explain.pdf
(25 points) Provide an example of a specific piece of spyware- Explain.pdf(25 points) Provide an example of a specific piece of spyware- Explain.pdf
(25 points) Provide an example of a specific piece of spyware- Explain.pdf
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
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
 
[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
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
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
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
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
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
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...
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 

(Python) A variable defined inside a function is a local variable- oth.pdf

  • 1. (Python) A variable defined inside a function is a local variable; otherwise, it is a global variable. If a local variable has the same name as a global variable, the local variable is used inside the function. What does this print? def myFunc1 (): one = -1 print (one, two) one = 1 two = 2 print (one, two) myFunc1 () print (one two)