What would be the output of the following?
autocorrectisawful = 4
while (autocorrectisawful > 0):
print(autocorrectisawful)
if (autocorrectisawful == 2):
break
autocorrectisawful -= 1
In: Computer Science
In: Computer Science
Run the Python Queue Line Simulator three times
Python Queue Line
"""
File: pyQueueSim.py
Author: JD
"""
import random
print("Queue as a customer line\n")
queue = [] # Empty que
y = int(0)
# Queue up some customers
for i in range(1,20):
x = random.randint(1, 20)
if x >= 2 and x<= 8:
queue.append(x) # Add to the front
# Simulate cumstomer line processing
while True:
x = random.randint(1, 20)
if x >= 2 and x<= 8:
queue.append(x *2) # Add to the front
print("Queued :", x)
elif x >=9 and x <=14 and len(queue)>0:
y = queue.pop(0)
print ("Removed: ",y)
elif x == 17 and len(queue)>=10:
print ("Line closing\n")
while len(queue)>0:
y =
queue.pop(0)
print ("Removed: ",y)
break
Queue as a customer line
Queued : 3
Removed: 8
Queued : 7
Queued : 4
Removed: 7
Removed: 6
Removed: 7
Removed: 2
Removed: 2
Removed: 5
Queued : 4
Removed: 4
Queued : 3
Removed: 7
Removed: 6
Queued : 6
Removed: 14
Queued : 5
Removed: 8
Removed: 8
Removed: 6
Queued : 3
Queued : 5
Removed: 12
Queued : 4
Queued : 3
Queued : 3
Queued : 4
Queued : 4
Queued : 5
Queued : 6
Removed: 10
Removed: 6
Queued : 4
Queued : 5
Removed: 10
Removed: 8
Removed: 6
Removed: 6
Removed: 8
Queued : 4
Queued : 8
Queued : 2
Removed: 8
Queued : 8
Queued : 3
Queued : 8
Queued : 7
Removed: 10
Queued : 6
Removed: 12
Removed: 8
Queued : 8
Queued : 8
Queued : 4
Removed: 10
Queued : 4
Removed: 8
Removed: 16
Queued : 5
Removed: 4
Queued : 2
Queued : 2
Queued : 5
Removed: 16
Queued : 4
Line closing
Removed: 6
Removed: 16
Removed: 14
Removed: 12
Removed: 16
Removed: 16
Removed: 8
Removed: 8
Removed: 10
Removed: 4
Removed: 4
Removed: 10
Removed: 8
Press any key to continue . . .
IN PYTHON THANKS
In: Computer Science
Sarah received a 2018 Form W-2 from 2 different employers. The amounts reported in Boxes 3 and 4 of her W-2s is provided below. What amount of excess social security tax (if any) should she report on her 2018 Schedule 5, Line 72?
| Box 3: Social security wages | Box 4: Social security tax withheld | |
| Employer #1 | 87,600.00 | 5,431.20 |
| Employer #2 | 55,250.00 | 3,425.50 |
In: Accounting
1. Are the following statements true or false? For each, explain why.
(a) 15 divides 5
(b) gcd(4, 16) = 2
(c) 46 ≡ 2 (mod 4)
(d) For any positive even integer n, gcd(12, n) = 2.
(e) For all integers x, if 10 does not divide x, then 10 does not divide 22x.
(f) For all integers y, if gcd(9, y) = 3, then gcd(9, y2 ) = 9.
In: Advanced Math
Let p be an odd prime and a be any integer which is not congruent to 0 modulo p.
Prove that the congruence x 2 ≡ −a 2 (mod p) has solutions if and only if p ≡ 1 (mod 4).
Hint: Naturally, you may build your proof on the fact that the statement to be proved is valid for the case a = 1.
In: Advanced Math
How to figure out haplotypes?
Site 1 Site 2 Site 3 Site 4
Mother GT AA GG AT
Father TT AG CT AA
Child 1 GT AA GT AT
Child 2 TT AA GT AA
Child 3 TT AG CG AA
In: Biology
10). From a group of 6 men and 8 women a committee consisting of 4 men and 3 women is to be formed. How many different committees are possible if:
a. 2 of the men refuse to serve together?
b. 2 of the women refuse to serve together?
c. 1 man and 1 woman refuse to serve together?
In: Statistics and Probability
The following is a payoff table giving costs for various situations. What decision would an optimist make?
| State 1 | State 2 | State 3 | |
| Alternative 1 | 45 | 37 | 83 |
| Alternative 2 | 16 | 59 | 72 |
| Alternative 3 | 23 | 65 | 91 |
| Alternative 4 | 44 | 33 | 55 |
In: Advanced Math
QUESTION 1
On 1st October 2017, Sugar Limited acquired 90% of Salt limited by issuing 100 000 shares at an agreed value of N$1.60 per share and N$ 140 000 in cash.
At that time, the Statement of Financial Position of Salt Limited was as follows:
N$ 000
Property plant and equipment 190
Inventories 70
Trade receivables 30
Cash and cash equivalent 10
Trade payables (40)
Total 260
The Consolidated Statements of Financial Position of Sugar Limited as at 31 December were as follows:
2017 2016
N$000 N$ 000
Non-current assets
Property, plant and equipment 2 500 2 300
Goodwill 66 0
Total 2 566 2 300
Current assets
Inventories 1 450 1 200
Trade receivables 1 370 1 100
Cash and cash equivalents 16 50
Total 2 836 2 350
Total Assets 5 402 4 650
Equity attributable to equity holders of the parent
Share capital (N$ 1 ordinary share) 1 150 1 000
Share premium account 590 500
Retained earnings 1 791 1 530
3 531 3 030
Non- controlling interest 31 0
3 562 3 030
Current liabilities
Trade payables 1 690 1 520
Income tax payable 150 100
1 840 1 620
Total equity and liabilities 5 402 4 650
The Consolidated Statement of Profit or Loss for the year ended 31 December 2017 was as follows:
Revenue 10 000
Cost of sales (7 500)
Gross profit 2 500
Administrative expenses (2 080)
Profit before tax 420
Income tax expense (150)
Profit for the period 270
Attributable to:
Equity holders of the parent 261
Non- controlling interest 9
270
You are also given the following information:
1. All the subsidiary are wholly owned
2. Depreciation charged to the consolidated income statement amounted to
N$210 000
3. There were no disposals of property, plant and equipment during the year
4. No dividend were paid by the parent company
Required
Prepare a Consolidated Statement of Cash flows for the year ended 31 December 2017 under the indirect method in accordance with IAS 7.
On 1st October 2017, Sugar Limited acquired 90% of Salt limited
by issuing 100 000 shares at an agreed value of N$1.60 per share
and N$ 140 000 in cash.
At that time, the Statement of Financial Position of Salt Limited
was as follows:
N$ 000
Property plant and equipment 190
Inventories 70
Trade receivables 30
Cash and cash equivalent 10
Trade payables (40)
260
The Consolidated Statements of Financial Position of Sugar Limited
as at 31 December were as follows:
2017 2016
N$000 N$ 000
Non-current assets
Property, plant and equipment 2 500 2 300
Goodwill 66 0
Total 2 566 2 300
Current assets
Inventories 1 450 1 200
Trade receivables 1 370 1 100
Cash and cash equivalents 16 50
2 836 2 350 Total Assets 5 402 4 650
Equity attributable to equity holders of the parent
Share capital (N$ 1 ordinary share) 1 150 1 000
Share premium account 590 500
Retained earnings 1 791 1 530 Total 3 531 3 030
Non- controlling interest 31 0
Total 3 562 3 030
Current liabilities
Trade payables 1 690 1 520
Income tax payable 150 100
Total Current 1 840 1 620
Total equity and liabilities 5 402 4 650
The Consolidated Statement of Profit or Loss for the year ended 31
December 2017 was as follows:
Revenue 10 000
Cost of sales (7 500)
Gross profit 2 500
Administrative expenses (2 080)
Profit before tax 420
Income tax expense (150)
Profit for the period 270
Attributable to:
Equity holders of the parent 261
Non- controlling interest 9
270
You are also given the following information:
1. All the subsidiary are wholly owned
2. Depreciation charged to the consolidated income statement
amounted to
N$210 000
3. There were no disposals of property, plant and equipment during
the year
4. No dividend were paid by the parent company
Required
Prepare a Consolidated Statement of Cash flows for the year ended
31 December 2017 under the indirect method in accordance with IAS
7.
In: Accounting