Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to use switch/case in python?
Post: RE: How to use switch/case in python?

Final code: def add(a, b) : return a + b def substract(a, b) : return a - b def divide(a, b) : return a / b def multiplication(a, b) : return a * b def increase(a, b) : return a **...
newbieguy General Coding Help 9 4,085 Nov-08-2019, 11:35 AM
    Thread: How to use switch/case in python?
Post: RE: How to use switch/case in python?

I appreciate that you found a solution and shared with it ! Thank you bro,this theme is solved.
newbieguy General Coding Help 9 4,085 Nov-07-2019, 08:12 PM
    Thread: How to use switch/case in python?
Post: RE: How to use switch/case in python?

Quote:There is no switch/case statement in Python. Use if/elif instead or a data structure. You did use a data structure, but I would do it this way: Yea I know it,I wanted to know way that is being s...
newbieguy General Coding Help 9 4,085 Nov-07-2019, 07:06 PM
    Thread: How to use switch/case in python?
Post: RE: How to use switch/case in python?

I agree,your code works,but you used if statement, I like'd to learn how to use switch/case statement For example ( I took it from: www.pydanny.com/why-doesnt-python-have-switch-case.html) def numbers...
newbieguy General Coding Help 9 4,085 Nov-07-2019, 06:51 PM
    Thread: How to use switch/case in python?
Post: How to use switch/case in python?

Hi everyone! If you can see, I am totally newbie in python. I want to create easy calculator used with switch/case statement. My idea is: def add(a,b): return a+b def substract(a,b): return a-...
newbieguy General Coding Help 9 4,085 Nov-07-2019, 06:35 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020