What are the major python data types?
symbol for addtion
+
symbol for subtraction
-
symbol for mult
*
symbol for division
/
1.) symbol for modulo
2.) explain what it does
Example 7%4 will give you 3
Example 8%2 will give you 0
What is the symbol for exponents?
**
Example 2**3 will give you 8
what is a variable?
variables stores data types
what are some of the rules for naming variables?
what is dynamtic typing?
you can reassigned variables to different data types
Example:
dog = 5
dog = “Jolly”
print(dog)
the code should output “Jolly”
Example: type(5) #it should output int
type(“Bob”) #it should output str
what is indexing in terms of strings?
indexing is the term you use when you want to grab a single chararter of a string. we us [] to get there character we want.
Example:
quote = “hello world”
quote[0] #output should be ‘h’
quote[8] #output should be ‘r’
quote[9] #output should be ‘l’
quote[-2] #output should be ‘l’

what is slicing in terms of strings?
slicing allows you to grab a subsection of muluple strings. It uses the following syntax:
[start:stop:step]
start = is the numerical index you want to for the slice start
stop = the index you want to end(but not include)
step = is the size of the “jump” you wish to take or skip by
example:
word = “abcdefghijk”
word[2:] #it should output ‘cdefghijk’
word[2:12] #it should output ‘cdefghijk’
word[:3] #it should output ‘abc’
word[0:3] #it should output ‘abc’
word[3:6] #it should output ‘def’
word[1:3] #it should output ‘bc’
word[::2] #it should output ‘adgj’
word[0:13:2] #it should output ‘adgj’
word[2:7:2] #it should output ‘ceg’
word[0:13:-1] #it should output ‘kjihgfedcba’
word[::-1] #it should output ‘kjihgfedcba’
what is the lenth fucntion in terms of strings?
len()
it tells you the length of a string
Example: len(“bob”) #It should output 3
len(“I am”) #it should output 4
How do you create comments in python?
By using hashtags
Example: #this is a comment
how do you make a string capitalize?
upper method
variable.upper()
Example: name = jason
cap_name = name.upper()
print(name) #should print jason
print(cap_name) #should print JASON
how do you make a string all lower case?
lower method
variable.lower()
what is the split method and what does it do in terms of strings?
split method
variable.split()
it turns a string into a list.the objects in the list are split by the spaces in the strinf
Example:
word = “hello world”
x = word.split()
print(x) #it should print [“hello”,”world”]
word2 = “hi this is a string”
y = word2.split(“i”)
print(i) #it should print [“h” ,”th” , “s a str” ,”ng”]
What does the format method does?

What are the 3 ways to perform string formatting?
How does the f-string format looks

How to format floats(decimals) in the f-string formatting?

How do you create a list
