Create a list of your favourite superheros and another list of their secret identities

8 Exercises

  1. Create a list of your favourite superheros and another list of their secret identities.
    1. Convert your two lists into a dictionary. (Can you do it in one line?)
    2. Remove one of your heroes and add a villain to your dictionary.
    3. Add a character that has multiple identities to your dictionary. (What kind of object should this be?)
    4. Demonstrate that you can look up one of your character’s identities.

SuperheroIdentityIron ManTony StarkThe ThingBen GrimmStormOroro MunroeSpider-ManPeter Parker, Miles MoralesIn [61]:

# Add your solution here
  1. Use Hubble’s law (????=????0????v=H0D) to calculate the distance (in Mpc) of the galaxies in the following table.

GalaxyVelocity (km/s)NGC 1231320NGC 23425690NGC 44428200

Remember that ????0≈70H0≈70 km/s/Mpc.

In [ ]:

# Add your solution here
  1. Flatten the following list using list comprehension.
mylist = [[[1, 2], [3, 4, 5]], [[6], [7, 8]]]

In [ ]:

# Add your solution here
  1. Write a generator function that can be used to calculate the Fibonacci sequence.

In [ ]:

# Add your solution here

LAST 4 QUESTIONS ON THE ATTACHED FILE!

  • attachment

    week01-assignment.ipynb

LOOKING FOR THIS ASSIGNMENT OR A SIMILAR ONE? WE HAVE HAD A GOOD SUCCESS RATE ON THIS PAPER! ORDER WITH US TODAY FOR QUALITY WORK AND GET A DISCOUNT!

ORDER NOW

Disclaimer:

All types of paper that Discount Writers provides is only for the purpose of assistance! No text, paper, assignment, discussion would be similar with another student therefore guaranteeing Uniqueness and can be used with proper references only!

More tools: Better Grades: Choose your Homework Help:

Assignment Help: We would write your papers according to the instructions provided and guarantee you timely work

 

Entire Online Class Help: We are here for you and we would do your entire Class work from discussions, assignments, Replies, Exams and Quizzes at a Cost

 

Exam/ Quiz Help: We have a team of writers who specialize on exams from any specific field and we would give you an A+ Grade!

 

ORDER NOW