Answer:
class Counter:
def __init__(self, counter, limit):
self.counter = counter
self.limit = limit
def increment(self):
if self.counter < self.limit:
self.counter += 1
def decrement(self):
if self.counter > 0:
self.counter -= 1
def get_value(self):
return self.counter
Choose Start, type the name of the application, like Word or Excel, in the Search programs and files box. In the search results, click the application to start it. Choose Start > All Programs to see a list of all your applications. You might need to scroll down to see the Microsoft Office group.
Answer:
phones = {'John': '1234567', 'Julie' : '7777777'}
Explanation:
In the code given in the question phones dictionary contains contains two keys John and Julie and have the values '5555555' and '7777777' respectively. Now in the code the key John in the dictionary phones is assigned the value '1234567' .So the value corresponding to the key John becomes '1234567'.
The program is an illustration of loops and conditional statements
<h3>
Loops</h3>
Loops are used to perform repetitive operations.
<h3>
Conditional statement</h3>
Conditional statements are used to make decisions
<h3>The python program</h3>
The program in Python, where comments are used to explain each line is as follows.
#The following is repeated 5 times; i.e. the rows
for i in range(5):
#The following is repeated 5 times; i.e. the columns
for j in range(5):
#For rows 2 and 5
if i == 1 or i== 3:
#For columns 1 and 5
if j == 0 or j == 4:
#This prints *
print('*',end='')
#For other columns
else:
#This prints an empty space
print('',end=' ')
#For other rows
else:
#This prints *
print('*',end='')
#This prints a new line
print()
Read more about loops at:
brainly.com/question/19344465