#ASSIGNMENT ONE

#NUMBERS
#Write an equation that uses multiplication, division, an exponent, addition, and subtraction that is equal to 100.25.
#Hint: This is just to test your memory of the basic arithmetic commands, work backwards from 100.25.



#What is the type of the result of the expression 3 + 1.5 + 4?





#What would you use to find a number’s square root, as well as its square?






#STRINGS
#Given the string 'hello' give an index command that returns 'e'



#Reverse the string 'hello' using slicing:


#Given the string hello, give two methods of producing the letter 'o' using indexing.



#LISTS
#Build this list [0,0,0] two separate ways.


#Reassign 'hello' in this nested list to say 'goodbye' instead:
list3 = [1,2,[3,4,'hello']]



#Sort the list below:
list4 = [5,3,4,6,1]
 

#DICTIONARIES
#Using keys and indexing, grab the 'hello' from the following dictionaries: 
d = {'simple_key':'hello'} 
 



d = {'k1':{'k2':'hello'}}


 
d = {'k1':[{'nest_key':['this is deep',['hello']]}]}



 
d = {'k1':[1,2,{'k2':['this is tricky',{'tough':[1,2,['hello']]}]}]}


 
#Can you sort a dictionary? Why or why not?



#TUPLES
#What is the major difference between tuples and lists?




#How do you create a tuple?




#SETS
#What is unique about a set?



#Use a set to find the unique values of the list below:
list5 = [1,2,2,33,4,4,11,22,3,3,2]





#BOOLEANS
#What will be the resulting Boolean of the following pieces of code
2 > 3


3 <= 2


3 == 2.0


3.0 == 3


4**0.5 != 2


#What is the boolean output of the cell block below?
# two nested lists
l_one = [1,2,[3,4]]
l_two = [1,2,{'k1':4}]
 
# True or False?
l_one[2][0] >= l_two[2]['k1']
 
 
 
 
 
 
 
 
 
 

 


 

