python | Unsorted

Telegram-канал python - Python

135201

You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython

Subscribe to a channel

Python

Guys what is OOP in python

Читать полностью…

Python

They lead to an insight.

Define void functions add and subtract. Use them somewhere else.

Читать полностью…

Python

If you have add and subtract void functions, you either do add or subtract, but can you do both? First one then the other?

Читать полностью…

Python

Exactly where I wanted to get you to and exactly the reason why you should be trying things out.

Читать полностью…

Python

Inside the function or outside the function?

Читать полностью…

Python

I meant something like this:

add(add(2,3), 5)

Читать полностью…

Python

That looks complicated. Now try it with returns

Читать полностью…

Python

#Using a void fucntion with a variable
def add(x,y):
global addition
addition = x+y
print(addition)
add(3,3)

"""of course I meant using
the void functions"""
b,a = 2,2
addition += b+a
print(addition)

Читать полностью…

Python

#Using a return value function:
def add(x,y):
return x+y
total= add(3,3)
print(f"Charly, this your total: {total}")

"""What if you want to do something
like add wto numbers then add an
other number to that result?"""
a,b = 2,2
total += a+b
print(total)
@Carlangueitor

Читать полностью…

Python

Now, to my beginner eyes, I get 6 each time.
So, I wonder what makes one different to the other in this case!

Читать полностью…

Python

#Using a return value function:
def add(x,y):
return x+y
total= add(3,3)
print(f"Charly, this your total: {total}")

Читать полностью…

Python

The difference is not about how many times you call it but returning something or not

Читать полностью…

Python

I tried it last night.
The week before. I have written the same code over and over.
But, one is a void function, the other is a returning value function. But If I use a variable with the void function, I am getting the same results. So, I wondered what makes one different to the other?

Читать полностью…

Python

Again, not to bo rude but incetivate you to be more proactive 👍

Читать полностью…

Python

My understanding is now a little bit broader than what I have started with.
Once you use the return function, you can call the function wherever you want in the code, right?

Читать полностью…

Python

Alright.
I will try to do so when I am back home👍

Читать полностью…

Python

I am doing both inside the function or outside?

Could you give me a prompt that would require me to do both?(addition and subtraction)
I always aim to solve the problem regardless of the route that I am taking.
That's why I asked, do they both (void-function and value-returning functions) lead to the same outcome?.

Читать полностью…

Python

I was in a rush last night.
I had the exam this morning and I wanted to quickly understand.
I could write a void-function and a return valid function but I didn't know what actually made them different. Like are they interchangeable or not. So, I was limited on time to go deeper on it.
Otherwise, I would've taken my time with it.

Читать полностью…

Python

I am finding it hard to do.
I will take it as a homework.
Thank you for working with me

Читать полностью…

Python

res = add(2,3)
res1(res, 5)

if you find it hard to understand

Читать полностью…

Python

I have.
With returns I don't need to use a global variable

Читать полностью…

Python

So, I could use the variable outside the function

Читать полностью…

Python

of course I meant using the functions

Читать полностью…

Python

What if you want to do something like add wto numbers then add another number to that result?

Читать полностью…

Python

#Using a void fucntion with a variable
def add(x,y):
addition = x+y
print(addition)
add(3,3)

Читать полностью…

Python

Let me send you the code then.
I will write it now

Читать полностью…

Python

Last night or theprevious week is irrelevant, Do it now

Читать полностью…

Python

I did yes.
I normally would've done that but, I had a very little time

Читать полностью…

Python

Why don't you try it? it will take less tha 5 minutes to write that code

Читать полностью…

Python

I get it, just seemed like you avoided to do some research yourself and aski for more specific stuff. remember writting software will involve a lot of reading

Читать полностью…
Subscribe to a channel