Questions
So currently I am working on some SQL with python which is linked to my database...

So currently I am working on some SQL with python which is linked to my database and I am stuck on a split problem. So in the program it connects to the database and then next you input either list, add, update, remove or allocate. So lets say I want to add a new data into the database you just need to write: update -name='Ava - #2' -class=2.

After you type this there is a variable called val which does the strip and split.

So as of right now what I have done is:

val = input('> ').strip().lower()
parts = val.split(' ')
print(parts)

So if I input the following: update -name="Nile Adam" -class=2

I expect the following output: ['update', '-name="Nile Adam"', '-class=2']

However the output I get is: ['update', '-name="Nile', 'Adam"', '-class=2']

In: Computer Science

There will be three grades for each student in "grades.txt" (see example file bellow). In "student.txt"...

There will be three grades for each student in "grades.txt" (see example file bellow). In "student.txt" there are two students first and last names. In "grades.txt" the grades for each student will be on the same line number as the students name was on in "students.txt".

So if line 1 of "students.txt" contains:

Joe Blow

then line 1 of "grades.txt" would contain Joe Blow's grades:

85 54.3 56

Into an output file called "report.txt" output the student's last name then a comma the their first name. Following this, calculate their average and assign a letter grade using the following scale:

'A': grade >= 90

'B': 90 > grade >= 80

'C': 80 > grade >= 70

'D': 70 > grade >= 60

'F': grade < 60

If the final grade of a student is greater than 100 instead of printing their letter grade output the statement "Teacher was far too easy". The "report.txt" should have a heading on each of the columns the first saying "Student's Name" and the second saying "Student's Grade".

In: Computer Science

i'm working on this assignment where we must simulate a bank account. I am having a...

i'm working on this assignment where we must simulate a bank account. I am having a few issues. The first issue is that for menu option 1 i am struggling to make the program so that I can add the name and balance of the account all at once. For example I would type "mike 350" and it would update the dictionary with a new account and balance, right now i have to open the account then deposit a balance separately using two different menu functions. The second issue i am having is that every account name in the dictionary has the same balance, I need to have each person have a separate balance. The third and last issue I am having is with menu option #6, i am not sure how to list the account names and balances with a number of each account to the left, the professor wants the output to look like this for option 6

No Customer Name   Balance

== =============   =======

1 joe 10

2 jim 20

3 eric 30

I have made it this far.

def main():
  
print("1. Open an account")
print("2. Close an Account")
print("3. Deposit money")
print("4. Withdrawal money")
print("5. Enquire about balance")
print("6. Print a list of customers and balances")
print("7. Quit")


accounts = {}
balance = 0
main()

while True:
menu_choice = int(input("Type in a menu choice: "))

#menu choice 1
if menu_choice == 1:
number = input("Enter name of the new customer and \nthe amount of money to be deposited \n into the new account (Ex. 'Mike 350'):")
if number in accounts:
print('This customer already exists!')
  
else:
accounts[number]=balance
print ("Account name", number, "opened.")

#menu choice 2
elif menu_choice == 2:
number = input("Account name:")
  
if number not in accounts:
print('Enter the customer/account name to be deleted: ')
if number in accounts:
if balance>0:
print('Can not close an account with balance greater than zero')
else:
del accounts[number]
print ("Account number", number, "is closed.")

#menu choice 3
elif menu_choice == 3:
print ("Enter the customer name for deposit: ")
number = input("Account name: ")
if number in accounts:
deposit = float(input("Enter the amount to be deposited: "))
  
balance += deposit
print ("your balance is:", balance-deposit, "before deposit")
print ("Your balance is:", balance, "after deposit")
else:
print ("This customer doesn't exist!")

#menu choice 4   
elif menu_choice == 4:
number = input("Enter the customer name for withdrawl: ")
if number not in accounts:
print('This customer doesnt exist!')
  
if number in accounts:
withdraw = float(input("Enter the amount to be withdrawn: "))
if withdraw <=balance:
balance -=withdraw
print ('your balance is:', balance+withdraw, 'before withdrawal')
print ("Your balance is:", balance, 'after withdrawal')
if withdraw >balance:
print ('your balance is:', balance, 'before withdrawal')
print ('You dont have enough balance to cover the withdrawal')

#menu choice 5
elif menu_choice == 5:
number = input('Enter the customer name for balance enquiry: ')
if number not in accounts:
print('This customer doesnt exist!')

if number in accounts:
print('your balance is:', balance)
  
#menu choice 6
elif menu_choice == 6:
print ("Accounts")
for x in accounts.keys():
print ('No Customer Name Balance')
print ('============================')
print (x , balance\n)

#menu choice 7
elif menu_choice == 7:
print ("Quit.")
break
else:
print ("Please enter a menu choice between 1 and 6.")

main()

In: Computer Science

The controller of the Red Wing Corporation is in the process of preparing the company’s 2016...

The controller of the Red Wing Corporation is in the process of preparing the company’s 2016 financial statements. She is trying to determine the correct balance of cash and cash equivalents to be reported as a current asset in the balance sheet. The following items are being considered:

  

a. Balances in the company’s accounts at the First National Bank; checking $15,300, savings $23,900.
b. Undeposited customer checks of $7,000.
c. Currency and coins on hand of $760.
d.

Savings account at the East Bay Bank with a balance of $580,000. This account is being used to accumulate cash for future plant expansion (in 2018).

e.

$56,000 in a checking account at the East Bay Bank. The balance in the account represents a 20% compensating balance for a $280,000 loan with the bank. Red Wing may not withdraw the funds until the loan is due in 2019.

f. U.S. Treasury bills; 2-month maturity bills totaling $33,000, and 7-month bills totaling $38,000.

  

Required:
1.

Determine the correct balance of cash and cash equivalents to be reported in the current asset section of the 2016 balance sheet.

Cash and cash equivalents includes:

a

Balance in checking account       

 
 

Balance in savings account          

 

b

Undeposited customer checks

 

c

Currency and coins on hand       

 

d

Balance in savings account          

 

e

Balance in checking account       

 

f

U.S. treasury bills            

 

Total

In: Accounting

The following is a summary of the May 2016 operations of Reagan Company that makes and...

The following is a summary of the May 2016 operations of Reagan Company that makes and sells airplane models. Suppose that the company uses the FIFO method.

Physical Units

Direct Materials

Conversion Costs

WIP, beginning inventory

28,000

$39,200

$30,800

     Degree of completion for BI

100%

25%

Started in May

60,000

Completed and transferred out in May

66,000

WIP, ending inventory

22,000

     Degree of completion for EI

100%

50%

Costs added in May

$90,000

$280,000

1.What is the amount of direct materials cost assigned to ending WIP at the end of May?

Group of answer choices

$44,000

$39,200

$33,000

$22,000

2.What is the cost of goods transferred out during May?

Group of answer choices

$293,000

$517,000

$363,000

$447,000

In: Accounting

23-2. December 31 2017                         2016 33,500              &nb

23-2. December 31

2017                         2016

33,500                         13,000 Cash

12,250                         10,000 Accounts Receivable

12,000                         9,000 Inventory

0                                  3,000 Long-Investments

0                                  29,750 Building

0                                  (6,000) Accumalted depreciation on building

45,000                         20,000 Equipment

(2,000)                        (4,500) Accumlated depreciation on equipment

5,000                           9,250 Patents

105,750                       83,500 Total Assets

5,000                           3,000 Accounts Payable

1,000                           5,000 Dividends Payable

4,000                           8,500 Short-term Notes Payables

32,000                         25,000 Long term notes payable

39,000                         30,000 Common stock

6,000                            3,000 Pain-in capital excess of par

18,750                         9,000 Retained Earnings

105,750                       83,500 Total

Additional data related to 2017 are as follows:

1. A long term note for $16,000 was issued for the acquisition of equipment.

2. On January 1, 2017 the building was completely destroyed by a flood. Insurance proceeds on the building were $30,000.

3. Equipment that had cost 11,000 and was 40% depreciated was sold for 2,500.

4. Common stock with a par value of 5,000 and a market value of 6,000 was issued to pay off part of the long-term note.

5. A new long-term note was issued for the acquisition of equipment.

6. Equipment was purchased for cash.

7. Dividends were of 7,000 were declared during 2017.

Prepare the statement of cash flows, including any significant non-cash transactions after the reconciliation. (SHOW ALL OF YOUR WORK PLEASE)

In: Accounting

(Amounts in millions) 2017 2016 2015 Revenues $                    485,873.00 $            482,130.

(Amounts in millions) 2017 2016 2015
Revenues $                    485,873.00 $            482,130.00 $      485,651.00
Cost of sales $                    361,256.00 $            360,984.00 $      365,086.00
Gross Profit $                    124,617.00 $            121,146.00 $      120,565.00
Operating, selling, general and administrative expenses                         101,853.00                    97,041.00 $         93,418.00
Operating income $                       22,764.00 $               24,105.00 $         27,147.00
Non-operating Income/Expenses:
Interest expenses                               2,367.00                       2,548.00 $            2,461.00
Interest income                                    100.00                              81.00 $                 113.00
Interest, net $                          2,267.00 $                  2,467.00 $            2,348.00
Income from continuing operations before income taxes $                       20,497.00 $               21,638.00 $         24,799.00
Income taxes                               6,204.00                       6,558.00 $            7,985.00
Income from continuing operations $                       14,293.00 $               15,080.00 $         16,814.00
Income (loss) from discontinued operations, net of income taxes                                                 -                                          -   $                 285.00
Consolidated net income $                       14,293.00 $               15,080.00 $         17,099.00
Weighted-average common shares outstanding (basic)                               3,101.00                       3,207.00                 3,230.00
Cash Dividends declared $                          6,202.00 $                  6,285.72 $            6,202.00
Current assets:
Cash and cash equivalents                               6,867.00                       8,705.00 $            9,135.00
Receivables, net                               5,835.00                       5,624.00 $            6,778.00
Inventories                            43,046.00                    44,469.00 $         45,141.00
Prepaid expenses and other                               1,941.00                       1,441.00 $            2,224.00
Total current assets $                       57,689.00 $               60,239.00 $         63,278.00
Property and equipment:
Property and equipment                         179,492.00                 176,958.00 $      177,395.00
Less accumulated depreciation                          (71,782.00)                  (66,787.00) $       (63,115.00)
Property and equipment, net $                    107,710.00 $            110,171.00 $      114,280.00
Property under capital leases:
Property under capital leases                            11,637.00                    11,096.00 $            5,239.00
Less accumulated amortization                             (5,169.00)                     (4,751.00) $          (2,864.00)
Property under capital leases, net $                          6,468.00 $                  6,345.00 $            2,375.00
Goodwill                            17,037.00                    16,695.00 $         18,102.00
Other assets and deferred charges                               9,921.00                       6,131.00 $            5,671.00
Total assets $                    198,825.00 $            199,581.00 $      203,706.00
LIABILITIES AND EQUITY
Current liabilities:
Short-term borrowings                               1,099.00                       2,708.00 $            1,592.00
Accounts payable                            41,433.00                    38,487.00 $         38,410.00
Accrued liabilities                            20,654.00                    19,607.00 $         19,152.00
Accrued income taxes                                    921.00                           521.00 $            1,021.00
Long-term debt due within one year                               2,256.00                       2,745.00 $            4,810.00
Obligations under capital leases due within one year                                    565.00                           551.00 $                 287.00
Total current liabilities $                       66,928.00 $               64,619.00 $         65,272.00
Long-term debt                            36,015.00                    38,214.00 $         41,086.00
Long-term obligations under capital leases                               6,003.00                       5,816.00 $            2,606.00
Deferred income taxes and other                               9,344.00                       7,321.00 $            8,805.00
Redeemable noncontrolling interest                                                 -                                          -   $                              -  
Total Long-term liabilities $                       51,362.00 $               51,351.00 $         52,497.00
Total Liabilities $                    118,290.00 $            115,970.00 $      117,769.00
Equity:
Common stock                                    305.00                           317.00 $                 323.00
Paid-in Capital in excess of par value                               2,371.00                       1,805.00 $            2,462.00
Retained earnings & Accumulated other comprehensive income (loss)                            75,122.00                    78,424.00 $         78,609.00
Total Walmart shareholders' equity $                       77,798.00 $               80,546.00 $         81,394.00
Nonredeemable noncontrolling interest                               2,737.00                       3,065.00 $            4,543.00
Total equity $                       80,535.00 $               83,611.00 $         85,937.00
Total liabilities and equity $                    198,825.00 $            199,581.00 $      203,706.00
(Amounts in millions) 2014 2013 2012
Revenues $                    476,294.00 $            469,162.00 $      446,950.00
Cost of sales $                    358,069.00 $            352,488.00 $      335,127.00
Gross Profit $                    118,225.00 $            116,674.00 $      111,823.00
Operating, selling, general and administrative expenses $                       91,353.00 $               88,873.00 $         85,265.00
Operating income $                       26,872.00 $               27,801.00 $         26,558.00
Non-operating Income/Expenses:
Interest expenses $                          2,335.00 $                  2,251.00 $            2,322.00
Interest income $                               119.00 $                      187.00 $                 162.00
Interest, net $                          2,216.00 $                  2,064.00 $            2,160.00
Income from continuing operations before income taxes $                       24,656.00 $               25,737.00 $         24,398.00
Income taxes $                          8,105.00 $                  7,981.00 $            7,944.00
Income from continuing operations $                       16,551.00 $               17,756.00 $         16,454.00
Income (loss) from discontinued operations, net of income taxes $                               144.00 $                                   -   $                  (67.00)
Consolidated net income $                       16,695.00 $               17,756.00 $         16,387.00
Weighted-average common shares outstanding (basic)                               3,269.00                       3,374.00                 3,460.00
Cash Dividends declared $                          6,139.00 $                  5,361.00 $            5,048.00
ASSETS 2014 2013 2012
Current assets:
Cash and cash equivalents $                  7,281.00 $            7,781.00 $            6,550.00
Receivables, net $                  6,677.00 $            6,768.00 $            5,937.00
Inventories $               44,858.00 $         43,803.00 $         40,714.00
Prepaid expenses and other $                  2,369.00 $            1,588.00 $            1,774.00
Total current assets $               61,185.00 $         59,940.00 $         54,975.00
Property and equipment:
Property and equipment $            173,089.00 $      165,825.00 $      155,002.00
Less accumulated depreciation $             (57,725.00) $       (51,896.00) $       (45,399.00)
Property and equipment, net $            115,364.00 $      113,929.00 $      109,603.00
Property under capital leases:
Property under capital leases $                  5,589.00 $            5,899.00 $            5,936.00
Less accumulated amortization $                (3,046.00) $          (3,147.00) $          (3,215.00)
Property under capital leases, net $                  2,543.00 $            2,752.00 $            2,721.00
Goodwill $               19,510.00 $         20,497.00 $         20,651.00
Other assets and deferred charges $                  6,149.00 $            5,987.00 $            5,456.00
Total assets $            204,751.00 $      203,105.00 $      193,406.00
LIABILITIES AND EQUITY
Current liabilities:
Short-term borrowings $                  7,670.00 $            6,805.00 $            4,047.00
Accounts payable $               37,415.00 $         38,080.00 $         36,608.00
Accrued liabilities $               18,793.00 $         18,808.00 $         18,180.00
Accrued income taxes $                      966.00 $            2,211.00 $            1,164.00
Long-term debt due within one year $                  4,103.00 $            5,587.00 $            1,975.00
Obligations under capital leases due within one year $                      398.00 $                 327.00 $                326.00
Total current liabilities $               69,345.00 $         71,818.00 $         62,300.00
Long-term debt $               41,771.00 $         38,394.00 $         44,070.00
Long-term obligations under capital leases $                  2,788.00 $            3,023.00 $            3,009.00
Deferred income taxes and other $                  8,017.00 $            7,613.00 $            7,862.00
Redeemable noncontrolling interest $                  1,491.00 $                 519.00 $                404.00
Total Long-term liabilities $               54,067.00 $         49,549.00 $         55,345.00
Total Liabilities $            123,412.00 $      121,367.00 $      117,645.00
Equity:
Common stock $                      323.00 $                 332.00 $                342.00
Paid-in Capital in excess of par value $                  2,362.00 $            3,620.00 $            3,692.00
Retained earnings & Accumulated other comprehensive income (loss) $               73,570.00 $         72,391.00 $         67,281.00
Total Walmart shareholders' equity $               76,255.00 $         76,343.00 $         71,315.00
Nonredeemable noncontrolling interest $                  5,084.00 $            5,395.00 $            4,446.00
Total equity $               81,339.00 $         81,738.00 $         75,761.00
Total liabilities and equity $            204,751.00 $      203,105.00 $      193,406.00
1. Calculate the Net income, Dividens, Net sales, Net credit sales, average inventory, and Average fixed assets

  

In: Accounting

1. The inventory on hand at the end of 2016 for Reddall Company is valued at...

1.

The inventory on hand at the end of 2016 for Reddall Company is valued at a cost of $94,000. The following items were not included in this inventory:

  1. Purchased goods in transit, under terms FOB shipping point, invoice price $4,000, freight costs $200.
  2. Goods out on consignment to Marlman Company, sales price $5,600, shipping costs of $300.
  3. Goods sold to Grina Co. under terms FOB destination, invoiced for $1,900 which included $178 freight charges to deliver the goods. Goods are in transit.
  4. Goods held on consignment by Reddall at a sales price of $2,700 which included sales commission of 20% of sales price.
  5. Purchased goods in transit, shipped FOB destination, invoice price $2,100 which included freight charges of $190.

Required:

Determine the cost of the ending inventory that Reddall should report on its December 31, 2016, balance sheet, assuming that its selling price is 140% of the cost of the inventory.

$_________

2.

Why are the cost of goods sold and ending inventory amounts different for each of the three methods?

a. FIFO assumes different physical units are sold than does LIFO which results in different amounts being reported as cost of goods sold.

b. FIFO assumes different unit costs are allocated to the cost of goods sold and ending inventory than does LIFO.

c. Under FIFO, the cost of inventory includes freight-in, storage and insurance, whereas under LIFO these costs are expensed as incurred.

d. Under LIFO, purchase discounts are recorded as part of the cost of inventory when the discount is not taken, resulting in a higher cost of goods sold

In: Accounting

Valuation of Inventory The inventory on hand at the end of 2016 for Reddall Company is...

Valuation of Inventory

The inventory on hand at the end of 2016 for Reddall Company is valued at a cost of $94,000. The following items were not included in this inventory:

1. Purchased goods in transit, under terms FOB shipping point, invoice price $4,000, freight costs $200.

2. Goods out on consignment to Marlman Company, sales price $5,600, shipping costs of $200.

3. Goods sold to Grina Co. under terms FOB destination, invoiced for $1,900 which included $178 freight charges to deliver the goods. Goods are in transit.

4. Goods held on consignment by Reddall at a sales price of $2,700 which included sales commission of 20% of sales price.

5. Purchased goods in transit, shipped FOB destination, invoice price $2,100 which included freight charges of $190.

Determine the cost of the ending inventory that Reddall should report on its December 31, 2016, balance sheet, assuming that its selling price is 140% of the cost of the inventory.

In: Accounting

In the 2016 Summer Olympics in Rio, there were eight runners in the final of the...

In the 2016 Summer Olympics in Rio, there were eight runners in the final of the men's 100 meter dash. How many possible outcomes could we have seen on the podium?

(The podium honors the first three finishers in an ORDERED fashion. The first-place finishers gets the gold medal, second-place finisher gets the silver medal, and the third-place finisher gets the bronze medal.)

How many possible outcomes could we have seen on the podium that didn't include either of the two Americans? Remember the podium represents an ORDERED finish.

What is the probability that both of the American runners medalled? (To medal means to finish in the top three)

**Calculate under the assumption that order doesn't matter for this calculation.

How many possible outcomes could we have seen on the podium if we know that a runner from Jamaica finished first, a runner from America finished second, and a runner from neither Jamaica nor America finished third?

In: Statistics and Probability