Quiz 3: Conditional Statements

Hi Yashaswini here from batch DS301222,
attended conditional statements quiz for the question 9 i am getting no marks because in output am getting 5 as answer but in the options there is no 5.
attached screenshots for your ref pls do the needful.



3 Likes

It is not 1, its letter β€˜l’(el). you are checking for 1.

2 Likes

@yashaswini.kgowda95

Correct answer will be 3 only.
Please use β€œl” in if statement of your code instead of β€œ1”.
Explanation:
In β€œhello” there are 5 letters and c is increased by one for h, e and o only (those are not equal to l) as per if condition.
So answer will be 3

2 Likes