Question: what is the difference between if and if else statement?
Answer: if statement checks a condition and executes a set of statements when this condition is true, it does not do anything when the condition is false. if-else statement checks a condition and executes a set of statements when this condition is true, it executes another set of statements when the condition is false.