Answer:
class MarblesBoard(object):
def __init__(self, seq):
self.seq = list(seq)
def switch(self):
temp = self.seq[0]
self.seq[0] = self.seq[1]
self.seq[1] = temp
def rotate(self):
temp = self.seq[0]
for i in range(1, len(self.seq)):
self.seq[i-1] = self.seq[i]
self.seq[-1] = temp
def is_solved(self):
for i in range(len(self.seq)):
if i != self.seq[i]:
return False
return True
def __str__(self):
return ' '.join(list(map(str,self.seq)))
def __repr__(self):
return ' '.join(list(map(str,self.seq)))
class Solver(object):
def __init__(self, board):
self.board = board
def solve(self):
steps = 0
while not self.board.is_solved():
if self.board.seq[0] > self.board.seq[1] and self.board.seq[0] != len(self.board.seq) - 1:
self.board.switch()
else:
self.board.rotate()
print(self.board)
steps += 1
print('Total steps:', steps)
Explanation:
The Python class MarblesBoard creates an object of the board game used in the Solver class object instance and it holds data or attributes of the player piece movement and the magic methods (__str__ and __repr__). The Solver object gets the switch and rotate movementt of the player and displays the total steps at the end of the game.
Answer: the accounting number format
Explanation:
The standard accounting number format usually contains a dollar sign, a thousands separator and two decimal points, the dollar sign is locked to the far left side of the cell in an enclosure.
How to apply the accounting number format ;
I, select the range and right-click and choose Format Cells.
Ii. In the Format Cells Dialog box, with the Number Tab selected, choose Accounting
Iii. Accept the options shown below and click Ok.
The Accounting Format has been applied.
Answer:
In IT sector IT manager decides to have a JDA(joint Application Development) session first he has to keep the leader for it, The leader must be well educated and highly professional based experienced regarding the sector that he is dealing with it. JAD team will participate in discussions and plan to develop the criteria etc., There must be minimum of 3 to 4 members are needed for the discussion and provide support. The main agendas of the JAD session are
Agenda and different stages:
First they introduce the JAD members and see the requirements. They discuss the reason for the project and management. After that they provide clear view on the project and overview and discuss up to the clarification. Review the project and divide team members in to 2 to 3 members and allocate for the particular work. Discuss and develop all requirements and provide prototypes and all. finally report and prepare documentation and send it to the JAD team.
The main roles of the JAD team are: Managers who are provided for this team must research and provide the information on the particular project. Users who provide d information must see the line and developing level. The system analysis and object it managers look after issues, backups etc.,
Explanation:
See attached picture.
Explanation:
A computer is an electronic device that can store and proceda