


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



What is the purpose of the print function in Python? To display output on the screen.
What does the assignment operator (=) do in Python? It creates a variable and makes it reference data.
What is a variable in Python? A name that represents a value stored in the computer memory.
What is the result of the expression 5/ in Python? 2.5 (floating point division).
What is the result of the expression 5//2 in Python? 2 (integer division).
What does the exponent operator (**) do? Raises a number to a power.
What is the remainder operator (%) used for? Performs division and returns the remainder.
What is the difference between floating point division and integer division? Floating point division (/) returns a decimal, while integer division (//) returns a whole number.
What is string concatenation in Python? Appending one string to the end of another using the
How do you read input from the keyboard in Python? Using the input() function, which returns the data as a string.
What happens if you try to perform arithmetic on strings in Python? It will result in an error unless the strings are converted to numeric types.
What is a comment in Python? Notes of explanation within a program, ignored by the Python interpreter.
What is the purpose of the assignment statement in Python? To create a variable and assign it a value.
What is the result of the expression -5//2 in Python? -3 (negative result rounded away from zero).
What does the print function do when multiple items are passed as arguments? Displays them in the order passed, separated by spaces.