Question: Though you ll use them often, remember that conditional statements don t always need an else clause. When deciding the flow, ask yourself what you

Though youll use them often, remember that conditional statements dont always need an else clause. When deciding the flow, ask yourself what you want to have happen under a certain condition.
For example, if you wanted to find all of the words that have the letter n in them. If theres nothing that needs to happen when a word does not contain the letter n then you wont need an else clause.
The program should just continue onward!
What is the best set of conditional statements provided based on the following prompt? You want to keep track of all the words that have the letter t and in a separate variable you want to keep track of all the words that have the letter z in them.
If statement - Else statement
If statement - Elseif statement
If statement - If statement
If statement - Elseif statement - Else statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!