Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
Write an IF statement to check if a number is positive.
Think about how to compare the number with zero.
Provide the ELSE part to notify if the number is not positive.
Consider what needs to happen when the condition is false.
What is the main purpose of the IF statement in programming?
Think about the condition it checks.
True or False: The ELSE statement is optional in an IF structure.
Consider whether it's possible to have only an IF statement.
Create a program that accepts user input and checks if the input number is both even and greater than 10. Provide appropriate messages for each scenario.
Think about using nested IF statements for the conditions.
Develop an IF-ELIF-ELSE application where the program can grade students based on their activity participation during a course. Assume participation scores are out of 100.
Remember to define the function first, and then use conditions to categorize the score.
6 more questions in this section. Enroll free to practise them all.
Enroll free