208,197 views
39 votes
39 votes
What are the advantages and disadvantages of choosing a conditional operator? Does every if…else statement have an equivalent statement using a conditional operator? When would you choose and if…else, Elif structure over an if structure? Why doesn’t Python implement a switch statement option compared to other languages?

User Newbiiiie
by
2.8k points

1 Answer

28 votes
28 votes

Answer:

Computer programs use conditionals to select the correct path for a program to go down. When a program only selects one of two paths, it can use a simple conditional (if/else). When a program selects one of many paths, it can use nested or chained conditionals.

Step-by-step explanation:

User Martin Fehrs
by
2.7k points