Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Write an expression statement to assign the sum of 10 and 5 to a variable named total.
Use the format 'variable = expression'.
What is the output of the statement: x = 7? Show the value of x.
The assignment statement assigns the right-hand value to the left-hand variable.
Which of the following is an example of an assignment statement?
Look for the statement that literally assigns a value.
True or False: A break statement is used to skip the current iteration of a loop.
Think about what break does when it's encountered.
Write a program that takes input from users until they enter 'stop', tracking the count of entries and printing it at the end.
Consider how to manage user input and counting entries.
Create a function that takes a global variable and modifies it within that function using the global keyword.
Use the global keyword to access the global variable inside the function.
5 more questions in this section. Enroll free to practise them all.
Enroll free