<span>1. Tap or click the Start button, followed by All apps.
If you're not using the Desktop in Windows 10, tap the All apps button on the bottom-left of your screen instead. It's the icon that looks like the small list of items.
Tip: The Power User Menu is a much faster way to get to Command Prompt in Windows 10 but only if you're using a keyboard or mouse. Just choose Command Prompt from the menu that appears after pressing WIN+X or right-clicking on the Start button. </span><span><span>Find the Windows System folder from the list of apps and tap or click it. </span><span>Under the Windows System folder, click or tap Command Prompt.
Command Prompt should open immediately. </span><span>You can now execute whatever commands in Windows 10 you'd like to run.</span></span>
Answer:
start→ randomly pick a fruit from the list→ if the first fruit is 'apple', pick 'banana', else if 'orange', pick 'grape', else if 'grape', pick 'banana'→ print second fruit→end.
Explanation:
To pick a second fruit, some conditions have to be met,
- if you pick an apple, the second fruit should be a banana.
- if you pick an orange, the second fruit should be a grape.
- if you pick a grape, the second fruit should be a banana.
Answer:
False
Explanation:
insturctions are represented in binary numbers, data are represented in decimal numbers.
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:
1. <em>impr</em><em>ove</em><em> </em><em>air</em><em> </em><em>qua</em><em>lity</em><em>.</em><em>.</em>
<em>2</em><em>. </em><em>Eats</em><em> </em><em>food</em><em> </em><em>rich </em><em>in</em><em> </em><em>antio</em><em>xidants</em><em>.</em><em>.</em><em>.</em>
<em>3</em><em>. </em><em>Stop</em><em> </em><em>smok</em><em>ing</em><em>.</em><em>.</em><em>.</em><em>.</em>