60.3k views
2 votes
Define some everyday if else statements you use to determine action. What are the branches of your statement?

User Adinda
by
6.2k points

1 Answer

5 votes

Step-by-step explanation:

if(more than three hours left)

{

study web-development;

}

else

{

practice coding;

}

I have taken an real life example and present it as if-else statements.

If I have more than 3 hours free in a day.Then I should study web-development.

If i don't have more than 3 hours free in a day then I should practice coding.

Branches are the statements within the {} curly braces.In our case these are:-

study web-development;

practice coding;

User Amir Kirsh
by
7.0k points