Python 3 Flashcards
What are arithmetic operators in Python?
/, +, *. %, -
What are comparison operators in Python?
> , =, =, !=, ==
What are the operators for Boolean values?
And, Or, Not
What are string values in Python?
text
What does “what’s” + “ up!” return?
What’s up!
What does this code produce?
“hello” + 6
TypeError
Can’t concat a string and numerical value
What’s the result of
“3” + “4”
‘34’
in string form
What is the process of transforming one data type into another?
Type casting
How would you typecast the number 6 to a string?
str(6)
The type( ) method returns what?
the type of the object being passed.
A function is what?
a sequence of instructions that performs a specific task packaged as a unit.
Select the best answer, a function is?
a. reusable
b. flexible
c. modular
d. all of the above
d. all of the above
In f(x) = x 2
What is the f?
What is the (x)?
What does x2 represent?
name of the function input function definition
How do you define a Python 3 function?
with the def keyword
When typing print(‘Hello”) what is it’s purpose
it’s calling the print function