Post

Othieno Michael Edwards
Othieno Michael Edwards@EdwardsOthieno·
@Python_Dv 1. Concepts of Global & local variable 2. When is calc() is called, it accesses the return value in the callers. Global variable a = 3, 3 + 2 =5, 5 × 2 = 10 return value = 10 3. Print statement will evaluate to 10 + original global variable (3) = 13
English
0
0
3
299
Jimmy Fikes
Jimmy Fikes@akajim·
@Python_Dv 13. calc(a) has to be solved before the print statement will know what to do.
English
0
0
2
305
Jeff
Jeff@Jeff72571425107·
@Python_Dv the function calc add 2 to 'a' that has a value of 2 which gives 4 and then returns a * 2 = 4 * 2 = returns 8 print(calc(a) + a) print(8 + 2) which prints 10 ans: 10
English
0
0
1
113
WannaBe DickTater Joe Briben
WannaBe DickTater Joe Briben@xNuckinFutsx·
@Python_Dv This function will output who cares Python sucks. Whoever’s idea it was to use tabs instead of a block character should lose their programmer card immediately
English
0
0
0
54
HumeHealth
HumeHealth@myhumehealth·
I kept seeing “smart scales” everywhere… So I pulled up a real comparison list and read it like a skeptic. 👉 Full breakdown here.
English
0
7
69
646K
Paylaş