Python 3 for beginners ep14 - Passing variables between functions

Python 3 for beginners ep14 - Passing variables between functions

R4GE VipeRzZ

6 лет назад

24,672 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Jace Loves Strength
Jace Loves Strength - 21.03.2022 22:17

SUPER, SUPER helpful. My instructor + Google + Stackoverflow weren't helping at all. This was so simple and helpful.

The only additional thing I would ask would be, what about a function pulling variable from multiple functions?

so maybe something like:

a function "drinks" with variables of tea, soda, juice (perhaps assigned black, coke, apple respectively)
a separate function "entree" with variables of beef, pork, chicken (perhaps ribeye, bbq, fried chicken respectively)
a separate function "desserts" with variables of pudding, cake, ice cream (perhaps tapioca, red velvet, rocky road)
sending their variables off to function "full_meal"

Ответить
pikadroo
pikadroo - 10.08.2023 06:46

You have this big white screen but all the action is 20px high. Thanks.

Ответить
OmarsPlayTimeChannel
OmarsPlayTimeChannel - 06.07.2023 06:25

Thank you

Ответить
NoMusiciansInMusicAnymore
NoMusiciansInMusicAnymore - 05.04.2023 01:01

I'm in the same place as Jace, I am watching a video of my uni lecturer making me more confused, google was no help, this video makes it ridiculously clear. Thank you so much for this no nonsense, very logical explanation. AAaaand subscribed

Ответить
timsim83
timsim83 - 07.01.2023 13:35

tRNA. You for the concise explanation. It helped wrap my brain around this nuance of python!

Ответить
WIZARD FE D
WIZARD FE D - 19.08.2022 21:24

'if you dissliked it, hit the disslike button' xd

Ответить
Darcypastie
Darcypastie - 09.08.2022 13:49

great explanation

Ответить
1q
1q - 22.05.2022 19:21

Nice video. Straight to the point.

Ответить
Umid Akbarov
Umid Akbarov - 18.05.2022 16:13

Thanks man, this video helped me a lot with my assignment, lots of respect

Ответить
Austin奥斯丁
Austin奥斯丁 - 25.04.2022 12:38

OMG been struggling for this thanks !!

Ответить
Noor Ul Haq
Noor Ul Haq - 21.02.2022 20:53

Thank you so much! Have been struggling to find a solution to this for hours and this explains it perfectly.

Ответить
SR.A
SR.A - 12.02.2022 09:59

How do you pass a variable from a function that was called by the main function back to the main function?

Y = 2

Def main ():
One()
Two()

Def one():
X = input (‘enter a number’)

Def two():
Total = x * y

How do I get the input (x) from function one to go back to the main function so that it be passed to function two so that it can do the calculation?

Ответить
Carli
Carli - 27.11.2021 02:16

I actually had all my code working and this was missing! You helped me a lot, thanks!

Ответить
Nivedita Raj
Nivedita Raj - 24.11.2021 15:21

You made it so simple to understand. Thanks a lot :)

Ответить
ibo a
ibo a - 29.10.2021 02:41

what if i only want to assign one value to the in another function that take to inputs in ?
ex:
def hello(data)
data=equals something
def bye(data,stats)

Ответить
Juan Pazmino
Juan Pazmino - 29.07.2021 08:34

You have saved my life bro!

Ответить
Oliver Sanchez
Oliver Sanchez - 14.05.2021 21:14

Thankyou lad

Ответить
Brandy Heckenkamp
Brandy Heckenkamp - 19.03.2021 17:41

Thank you so much for this video. I couldn't figure out how to pass variables w/out using global. This video made it clear and simple.

Ответить
Andrew Kimani
Andrew Kimani - 27.11.2020 23:38

How can I print a function parameter alone without calling the function. Like in this case, how can you print number1 from test(number1, number2) outside the function?

Ответить
Grampa Graham
Grampa Graham - 17.11.2020 01:24

So how do you pass parameters into a function in another module?

Ответить
Inferno
Inferno - 21.10.2020 09:45

Thanks for this, I’m going to try it out!

Ответить
TallJack08
TallJack08 - 21.10.2020 01:13

Tysm

Ответить
Guruprasad R
Guruprasad R - 06.10.2020 21:20

Respect ✌️

Ответить
Vincent Campos
Vincent Campos - 05.07.2020 06:42

Thanks for posting this video!

Ответить
Jax
Jax - 02.07.2020 04:14

Easy and simple! Thanks, Bro

Ответить
gorillacapers
gorillacapers - 17.05.2020 06:38

Can I define number1 and number2 as global instead?

Ответить
Scott H
Scott H - 07.04.2020 15:18

Thanks you. This is such a helpful video for beginners

Ответить
Nova Sol
Nova Sol - 17.03.2020 10:19

Completely new to python and programming, taking a class. I've been stuck on this for an assignment for hours and neither my class videos, the book, nor the professor explained it clearly. This video helped me figure out where I was stuck in less than 3 minutes. Thanks friend, you're awesome <3

Ответить
Andrew Lacey
Andrew Lacey - 10.01.2020 20:29

Bless you! This is exactly what I needed!

Ответить
Hassaine Hassen
Hassaine Hassen - 18.07.2019 16:51

what if we wanna pass variable from test () to numberfunciton ()? I get an error variable before assignment , can you help me plz ?

Ответить
Raymond E
Raymond E - 18.11.2018 17:48

Nice Thanks for the video.

Ответить