For the first one its NOW, I'm not sure about the 2nd, the 3rd I think is penal code cases but i could be wrong, and the 4th one sounds like voting is the most logical answer.
Answer and Explanation:
def loop(start, stop, step):
return_string = ""
if step == 0:
step = 1
if start > stop: # the bug was here, fixed it
step = abs(step) * -1
else:
step = abs(step)
for count in range(start, stop, step):
return_string += str(count) + " "
return return_string.strip()
Answer:
A and B have different output:
A output will be 1
B output will be 123
Explanation:
A
X = 0
do x < 3
x = x+1
print x
while
B
X = 0
do x = x+ 1
print x
while x < 3
For statement A the condition statement which suppose to be after "while" is not set therefore the value of x will be printed.
For statement B the condition statement is set "x < 3" in front of "while" thereby result in iteration until the condition is false.
Statement A output will be 1
Statement B output will be 123
Tables are used to display information in a more arranged and organized manner.
Various ways of adding a row in an already existing table are:
1) By drawing a row in the table using the draw option.
2) By using the insert option under the Table Tools tab.
3) By designing the table with an added row using the Design tab.
<u>Explanation:</u>
In the insert option, go to the extreme right corner. There appears an option of Draw Table. Draw another row and it gets added.
This tab contains two tabs, Design and Layout that enable you to rapidly arrange your table, embed or erase lines and sections, set the arrangement for cells, and organization the typography of the content in your table.
Thus, a table and its capacity are built up from here on and open for designing.