Karteikarten
Computing Array Flash Cards
Karten in diesem Stapel (6)
- 1What is an element?The items in an array
- 2What is an array?A list of elements enclosed by square brackets
- 3What is meant by a position or an indexThe elements in an array each have a position, starting at 0. An index is used to search for a specific elements position in an array.
- 4Give an example of an array in Python.shoppingList = ["milk", "eggs", "bread"]
- 5How do you add or remove elements to an array in Python?shoppingList.append("rice")
shoppingList.remove("eggs") - 6How do you make an array code output a random response?1. import random
2. dieNumbers = [1,2,3,4,5,6]
3. dieRoll = random.choice(dieNumbers)
4. print (dieRoll)
Informationen
- Beschreibung
- Karteikarten am Computing Array Flash Cards, erstellt von Cole Sutton am 09/12/2020.
- Erstellt von
- Cole Sutton
- Aufrufe
- 0
- Bewertung