Type of variable to store whole numbers
What is integer?
A feature of a list that stores the position of an element
What is an index?
A loop that works best with lists and tuples
What is a for loop?
Create an empty dictionary for fruits
What is fruits = {}
The blueprint or cookie cutter for instantiating a software object in Python
What is a class?
A built-in Python function to assign user input to a variable
What is input()?
Write code to display the number 99 in nums = [22,4,60,99,-8]
What is print(nums[3])?
A loop that works forever until a condition is met
What is a while loop?
Create a tuple for 3 cars
What is cars = (“Tesla”, “Corvette”, “Mustang”)?
Create and instance of the Dog() class that has name and age in the constructor
d = Dog(“Fido”, 8)
A built-in Python function to will reveal the data type of a variable
What is type()?
Write code to print out all elements of list: nums = [22,4,60,99,-8]
What is for n in range(0, len(nums)):
print (nums[n]) ?
A while loop needs this inside the loop to iterate or repeat
What is a counter or accumulator?
A data structure that organizes data in key:value pairs
What is a dictionary?
The Python syntax used to create a constructor
What is _ _init_ _() ?
A built-in Python function that converts string to integer
What is int()?
The last element in a list occupies this important index position sometimes shown as n-1
What is upper bound?
This loop works best with robots and systems that need to run continuously
What is a while loop?
A data structure that cannot be changed once it is created
What is a tuple?
What will run or print out when the following code is called in Python:
c = Circle(16.5)
print(c)
What is the _ _str()_ _ method?
The act of converting data to string or number
What is parsing?
Write the code to add a name to list called friends
What is friends.append(“Randy”)?
Write a for loop using the “in” operator to print out the following tuple : responses = (“Hi”, “Bye”, “Later”, “Dude”)
What is for r in responses:
print(r) ?
Print out the third element: students = {1: "Tom", 2: "Naveen", 3: "Sanath"}
What is print(students[2])?
List 3 important concepts or strengths of OOP (object-oriented programming)
What is code reuse, encapsulation, inheritance, composition, polymorphism?