I'm sorry to be asking this since a lot has been written on the subject but I have a lot of difficulties working it into a specific project.
The goal is to create a MarblesBoard class that takes a set of numbers as inputs and will then play a game to put the numbers in order.
Here is my code:
class MarblesBoard:
def _init_(self, numbers):
self.board = []
for i in numbers:
board[i] = numbers[i]
def switch():
temp = board[0]
board[0] = board[1]
board[1] = temp
def main():
board = MarblesBoard((3,4,5))
print("I'm here")
So input the numbers (as a tuple), put them into an array, and then manipulate them like in the switch method.
But I can't print anything when I get to my main method.