palmtrees2309

joined 2 months ago
[–] palmtrees2309@lemm.ee 3 points 22 hours ago

What about fat spicy indian curry tho?

[–] palmtrees2309@lemm.ee 12 points 1 day ago (1 children)

Haha I am in Friday. Future is now old man

[–] palmtrees2309@lemm.ee 4 points 1 week ago (1 children)

But use correct channels dude. Make a Single post in relevant community on lemmy, mastodon, hackernews, heck even a reddit post. No shame in sharing your hardwork but respect community rules. Side note great project. I will star it.

[–] palmtrees2309@lemm.ee 2 points 1 week ago* (last edited 1 week ago)

After the split x becomes (1 and z becomes 1). They can't be converted to float. I think that's why. Let me run the code. Edit - Also as you are returning a, b, c from splitter but Python functions return a single object. The a, b, c turns to a tuple. But you are using js syntax I think. So we have to unwrap inside the calculate function.

Now my original comment is not useful but you can try to introduce a conditional to check of the numbers x and z are actually numbers before converting to floats

# Ask user to enter an expression and display output

def main():
    expression = input("Expression: ")
    print(calculate (splitter (expression)))

# Split expression into components and assign to variables as float values

def splitter (expression):
    print(expression)
    x, y, z = expression.split()
    print(expression.split())
    return x, y, z

# Calculate expression result

# Changes Beginning
def calculate(numbers):
    x,y,z = numbers
# Changes End

    x, z = float(x), float(z)
    if y == "+":
        return str(round((x + z), 1))
    elif y == "-":
        return str(round((xz), 1))
    elif y == "*":
        return str(round((x*z), 1))
    else:
        return str(round((x / z), 1))

main()

[–] palmtrees2309@lemm.ee 1 points 1 week ago

Not expected SRK, the tax evader, himself on my lemmy feed.

[–] palmtrees2309@lemm.ee 9 points 1 week ago

Waiting for a youtube iceberg video to mention this incident

[–] palmtrees2309@lemm.ee 4 points 1 week ago (1 children)

'nam flashbacks?

[–] palmtrees2309@lemm.ee 2 points 2 weeks ago (1 children)

I knew that so coordinate are for my college not my residence

[–] palmtrees2309@lemm.ee 9 points 2 weeks ago (2 children)

Sorry I will work on it. Thank you

 

Hello lemmy! I am a underGrad in Delhi, India. This is my portfolio website made with React, Typescript and Tailwind. Please go through it and if possible rate it.

[–] palmtrees2309@lemm.ee 19 points 3 weeks ago

And india is going after youtuber Comedians for dark comedy.

[–] palmtrees2309@lemm.ee 5 points 1 month ago

Thanks for adding the bottles shadow

[–] palmtrees2309@lemm.ee 5 points 1 month ago

Commit genocide and steal water from deprived communites.

view more: next ›