30.4k views
17 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?

1 Answer

4 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 Muhammad Soliman
by
7.7k points