Helping with homework
Q1- How can you get more information about a function or an object from inside a jupyter cell? A1Q2- How can you determine the data type of an object? A2Q3- Assign a variable named foo and give it a value of ‘bar’. What does assignment mean? A3Q4- You have an assortment of items you will need to keep track of. What would be a good data structure to keep them in? Provide an example. A4Q5- You have an assortment of names and telephone numbers. What might be a good data structure to keep them in? Show an example. A5Q6- You need to create a copy of an important list and alter the copy. Why is the following code a bad idea? list1 = [1,2,3] list2 = list1 list2[0]= 9 A6Q7- What is truthy and falsey? Provide a list example and a string example. A7Q8- What is the difference between a dynamically typed and statically typed language? Which one is python? When is that a good thing? When is that a bad thing? A8- Q9- Here is a link to the python built-in functions. Choose 2 and give an example of how to use them. A9- dir() function, an example: ranking_list = [5, 7, 9] list() function, an example: breakfast_menu = [‘eggs’ , ‘pancake’ , ‘omelette’] Q10- I need to know if an integer is odd or even. What operator might help me do that? Provide an example A10- Q11- What is a python expression? What does an expression evaluate to? A11- Q12- Provide an expression that evaluates which variable is greater. foo = 23 bar = 48 A12- Q13- Provide an if statement (inside the provided for loop) that prints ‘even’ if the number is even, ‘odd’ if the number is odd, and ‘three’ if the number is 3. my_list = [1,2,3,4,5,6,7,8,9] for i in my_list: pass #Your if statement goes here. #Be sure to indent the statement #And delete the word ‘pass’ A13- A14- What is the less than equal to operator? And show an example of how it is used. A14- Q15- What is the floored division operator? And show an example of how it is used. A15- Q16- Why does the following give an error? Show an example of how to fix it. A16 Q17- Why does this if statement evaluate to true and do what’s in the if body? You will see this shortcut a lot and it can be confusing as to what is going on. some_list = [‘fizz’,’buzz’,1,{‘key’:’value’}] if some_list: print(‘Hooray!’) A17- Q18- Write an expression that raises one number to the power of 3. A18- Q19- How can you change my_var form an int to a str? my_var = 42 A19- Q20- Slice some_string to only include the words lazy. some_string = “The quick brown fox jumped over the lazy dog.” A20- Q21- Assign a new variable sport to the 3rd element in the list. my_favorite_teams= [‘Chiefs’, ‘Cardinals’, ‘Blues’, ‘Lakers’,’Manchester United’, ‘Couch Surfing’] A21- Q22- What is the use case for the dir() method? A22- Q23- (3 pts) Write a function that takes in a number and doubles it. A23- Q24- Iterate through integers_list and print values that are multiples of 7. import random integers_list = [random.randint(0,1000) for i in range(50)] # a list comprehension # your code here A24-
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.