30 Questions
are made up of whole numbers, their negative counter parts and zero.
Integers
are numerical values that has decimal point.
float
are used in tasks ranging from simple daily counting to advance science and business calculations. Python follows PEMDAS precedence
Arithmetic Operators
Addition sign
Multiplication sign
floor division
//
exponent
**
remainder
%
also called python relational operator, compares the values of two operands and returns True or False based on whether the condition is met.
Comparison Operators
less than
<
greater than
less than or equal to
<=
greater than or equal to
=
equal to
==
not equal to
!=
begins and ends with either three single quotes or three double quotes. Any quotes, tabs, or newlines in between the “triple quotes” are considered part of the string.
multiline strings
allow you to include special characters in strings. To do this, simply add a backslash () before the character you want to escape.
escape sequences
means to combine or join two or strings together using the addition sign (+). Since Python does not add a space when concatenating, you have to manually add the space manually.
Concatenation and Multiplication
is used to get a specific character within a string-valued variable. Python offsets start at 0 and end at one less than the length of the string
offset operator
u can also get a certain amount of strings using
slice method
Python has built in function that can count the numbers of characters and returns an integer result. You can get the length of a string using the
len function
are use to clean up or remove the extra or unnecessary whitespace characters. Whitespace characters are referred to extra spaces in an object.
strip method
removes spaces on both sides
strip()
removes space on the left side
lstrip()
removes space on the right side
rstrip()
is used to create a list out of a string value. It helps if there is something in the string that can be separated. takes on the argument as a separator and not directly to the string itself.
split method
is used to combine list items to form a string value- object.
join method
is used to take on three arguments: the string you want to replace, the string you want to replace it with, and the number of times the replacement would occur
replace method
are used to change the case of the characters of the string using the following:
case method
it is the value that are enclosed inside the parenthesis when a function is used.
A parameter is the variable listed inside the parentheses in the function definition.
word bank
Test your knowledge of numeric values and arithmetic operations in Python, including whole numbers, decimal numbers, and the order of operations using PEMDAS.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free