Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created April 1, 2020 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/ea201d350b0f32097ec52551b9ba3968 to your computer and use it in GitHub Desktop.
Save codecademydev/ea201d350b0f32097ec52551b9ba3968 to your computer and use it in GitHub Desktop.
Codecademy export
import numpy as np
cupcakes = np.array([2, 0,75, 2, 1, 0,5])
recipes = np.genfromtxt('recipes.csv',delimiter = ",")
print(recipes)
eggs = recipes[:, 2]
one_egg = recipes[(eggs == 1)]
print(one_egg)
cookies = recipes[2, :]
double_batch = cupcakes * 2
grocery_list = double_batch + cookies
print(grocery_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment