Flashcards
Computing homework
Cards in this deck (5)
- 1Ham, eggs, applesShoppingList = (“ham”, “eggs”, “apples”)
Print (shoppingList[0]) - 2Ham, eggs, apples, cheeseShoppingList = (“ham”, “eggs”, “apples”)
ShoppingList.append(“cheese”)
Print(ShoppingList[3]) - 3Ham, eggsShoppingList(“ham”, “eggs”, “apples”)
ShoppingList.remove(“apples”)
Print(ShoppingList[1]) - 4The position of an element in an array is the [0] or [1] or [2] in the bottom lineShoppingList = (“ham”, “eggs”, “apples”)
Print (shoppingList[0]) - 5It imports a random choice. Either ham eggs or apples.Import random
ShoppingList = (“ham”, “eggs”, “apples”)
Print(ShoppingList)
Information
- Description
- Flashcards on Computing homework , created by Cameron Morton on 24/11/2020.
- Created by
- Cameron Morton
- Views
- 0
- Rating