Karteikarten
Computing homework
Karten in diesem Stapel (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)
Informationen
- Beschreibung
- Karteikarten am Computing homework , erstellt von Cameron Morton am 24/11/2020.
- Erstellt von
- Cameron Morton
- Aufrufe
- 0
- Bewertung