10 May 2026
Koshin Cabdullahi CaliMan this pickle 😂
Let's make a deal. You do the versions with void function, where the user_input_void function is used twice to get the input from the user, and I do the one with the return statements. But also add the two inputs from the user with add_void.
cloudedYes, user input 1 + user input 2
Why do I get the feeling that I am sent to do something undoable🙂
Koshin Cabdullahi CaliWhy do I get the feeling that I am sent to do something undoable🙂
It's not undoable, it's just gets messy.
cloudedYeah, are you stuck? Or don't have time to work on it?
I wouldn't say I am stuck but I am not making that much progress 😂
Koshin Cabdullahi CaliI wouldn't say I am stuck but I am not making that much progress 😂
Mind sharing what you have?
cloudedThe purpose is not to torture you but to make a point. We can go from what you have so far.
I am rather quite enjoying it so far
Koshin Cabdullahi Cali#monthly income
def income():
remaining_balance = int(input("Enter the remain: "))
expenses = int(input("Enter the expenses: "))
global total
total = remaining_balance + expenses
income()
print(f"your total income is: {total}")
#extended...
total = income()
print(total)
That's not using add_void and get_input_void.
cloudedThat's not using add_void and get_input_void.
It's just a variable.
I had to make a problem to solve or else they'd be no end point.
Koshin Cabdullahi CaliIt's just a variable.
I had to make a problem to solve or else they'd be no end point.
def add(x, y):
global result_add
result_add = x + y
def get_input(prompt):
global result_input
result_input = int(input(prompt))
get_input("x")
x = result_input
get_input("y")
y = result_input
add(x, y)
print(result_add)
Koshin Cabdullahi CaliThis looks 👌 🔥
How does it compare to this one?
def add(x, y):
return x + y
def get_input(prompt):
return int(input(f"Enter value for {prompt}: "))
x = get_input("x")
y = get_input("y")
result = add(x, y)
print(result)
cloudedHow does it compare to this one?
def add(x, y):
return x + y
def get_input(prompt):
return int(input(f"Enter value for {prompt}: "))
x = get_input("x")
y = get_input("y")
result = add(x, y)
print(result)
I am already in a rabbit hole trying to learn what prompt is python 😂
Koshin Cabdullahi CaliI am already in a rabbit hole trying to learn what prompt is python 😂
The text to display to the user.