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.
What is a control structure?
It helps to make decisions in code.
Write an if statement to check if a number is greater than 10.
Think of how to start your statement.
What is a conditional statement?
Think about how the program decides which code to run.
True or False: A while loop continues until a condition becomes false.
Consider how loops operate based on conditions.
Design a program in Python that asks the user for a number and uses a loop to sum all numbers from 1 to that number, outputting the total sum.
Use a loop to accumulate the sum.
Write a Python code using nested if statements to categorize a number as positive, negative, or zero based on user input.
Think about how you can check for multiple conditions.
5 more questions in this section. Enroll free to practise them all.
Enroll free