Question: Python Create a jupyter notebook. Rename the notebook (under File menu) with the format YourLastname_HW_1. For example, Cych_HW_1 Save the notebook (click on the disk

Python

  • Create a jupyter notebook.
  • Rename the notebook (under File menu) with the format YourLastname_HW_1. For example, Cych_HW_1
  • Save the notebook (click on the disk icon in the menu bar)
  • Create a markdown block in which you will describe what the notebook does.
  • Make a code block that creates a list called planets
    • append all the planets to the list.
    • make a copy of your planets list (with a different name).
    • print the planet at index 2 in your planet list.
    • set the planet at index 2 in your copy to 'X'
    • print the planet at index 2 in both lists (planet and your copy)
    • append the planet you overwrote to the end of the copied list.
    • use the help function to find out what the built in function len() does (help(len))
  • Make another code block that creates a list using range( ) with 8 values starting with 1.
    • print out your list
    • Create a set from each of the three lists.
    • Find the elements in common between the three sets.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!