Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is a variable in Python?
Think of variables as boxes holding information.
Write a line of code to print your name.
Start with the word print followed by parentheses.
What does 'print('Hello, World!')' do in Python?
Look for what the print function does.
True or False: Python is an interpreted language.
Consider how Python processes your code.
Create a Python program that asks for user input to enter their name and age, then greets them with their name and states whether they are a teenager or not.
Use if-else to determine if the age falls under the teenage category.
Write a function that calculates the area of a rectangle given its length and width. Allow it to return the area to the main program for printing.
Remember to define a function using 'def' and return the calculated area.
7 more questions in this section. Enroll free to practise them all.
Enroll free