section c dastan predictions Flashcards
State the name of an identifier for a public method in the Dastan class
PlayGame
Explain why this method is public and not private
It allows it to be accessed from outside the class by the main functions, otherwise if it was a private method this would not be possible
How many points do you lose when you choose a move from position 1, 2 and 3 in the queue?
1,4,7
Suppose you wanted to display the grid with 8 by 8 cells. What would you modify in the program?
Change this line:
ThisGame = Dastan(6, 6, 4) to
ThisGame = Dastan(8, 8, 4)
State the name of an identifier for a class that inherits from another class
Kotla
State the name of an identifier for a private method that has three parameters (including the object parameter).
CreateMoveOption
State the name of an identifier that is a Boolean variable
GameOver
What is the random module used for in the pre-release?
Randomly selects the move offer option
State the name of a built-in function
print, int, float, input, str
What effect does the super routine in class Kotla have?
Can use method class in the parent class, even if overridden
Give an example from the code of object instantiation?
Thisgame= Dastan(6,6,4)