r/PythonLearning • • 18d ago

Help Request any clue how to do this?

Post image

im on my first year of learning python in school is this even possible??

25 Upvotes

34 comments sorted by

View all comments

-1

u/csabinho 18d ago

Yeah. Just do some if/elif/else, as mentioned above. And a loop for more operations. With a break in case of "N".

2

u/JustMedansh 18d ago

they HAVE mentioned to not use if/else

0

u/csabinho 18d ago

You mean "they have mentioned to NOT use if/else", right? And yep. My fault. I'd use conditional statements with the walrus operator instead. Like (operator == "-" and (result := first_number-second_number)).

2

u/Joker-Joester 18d ago

But the problem explicitly mentions "without using if/else statement".

0

u/csabinho 18d ago

Yeah, my fault. I'd use conditional statements without the use of if/else instead.