GoConqr has a new look! Let us know what you think.

Flashcards

Lists/Functions - Datacamp intro

Archimed Nemes DS Easy English 8 cards

Cards in this deck (8)

  1. 1areas = ["hallway", 11.25, "kitchen", 18.0, "chill zone", 20.0, "bedroom", 10.75, "bathroom", 10.50] Add ["poolhouse", 24.5] to the end of the areas list. Store the resulting list as areas_1areas_1=areas+['poolhouse',24.5]
  2. 2areas = [11.25, 18.0, 20.0, 10.75, 9.50] Create copy of areas and name it as areas_copyareas_copy = areas[:]
  3. 3first = [11.25, 18.0, 20.0] Sort this list in descending order using sorted function and name new list first_sortedfirst_sorted=sorted(first,reverse=True)
  4. 4place = "poolhouse". Print out the number of o's in placeprint(place.count('o'))
  5. 5areas = [11.25, 18.0, 20.0, 10.75, 9.50] # Print out the index of the element 20.0print(areas.index(20.0))
  6. 6areas = [11.25, 9.50, 20.0, 10.75, 9.50] # Print out the index of the element 20.0 # Print out how often 9.50 appears in areasprint(areas.count(9.50))
  7. 7areas = [11.25, 18.0, 20.0, 10.75, 9.50] # Reverse the orders of the elements in areasareas.reverse()
  8. 8Print out correlation between first and second column of np_baseball np arraynp.corrcoef(np_baseball[:,0],np_baseball[:,1])

Information

Description
Easy DS Flashcards on Lists/Functions - Datacamp intro, created by Archimed Nemes on 02/01/2021.
Created by
Archimed Nemes
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?