In this python script find any bugs and errors which would cause the code to crash. The code must be re-written correctly.
After debugging make a separate list of all the errors
you found in the script.
contacts_list=[] # global variable, list of contacts_list, one string per contact
def pause()
""" pauses program e.g. to view data or message
"""
input("press enter to continue")
def load():
""" populate list with data
"""
contacts_list.append(('Milo ',
'063847489373'))
contacts_list.append(('Tony', '46483848')
contacts_list.append(('Betty'
'03747384043'))
print("%s records have been loaded"
%(len(contacts_list)))
add():
""" adds contact to list """
name = input("enter name : ")
phone_no = int(input("enter phone number :
"))
contacts_list.append(((phone_no, name)))
def view():
""" displays contacts_list """
index = 0
for contact in contacts_list:
print(index,"
",contact[0], " ", contact[2])
index += 1
pause()
def delete():
""" removes contact based upon index """
index=input("enter index of contact to delete
")
del contacts_list[index-1]
def menu():
""" loops menu of options and does these until
user quits """
while True:
print("")
print(" enter for
option")
print(" =
==========")
print(" v
view contacts_list")
print(" a
add contact")
print(" d
delete contact")
print(" q
quit")
option=input("your
option: ")
optoin=option.lower() #
always lower case
if option == "v":
#view()
elif option ==
"d":
delete()
elif option ==
"a":
add()
elif option ==
"q":
return # exit while loop and menu function
else:
print("invalid menu option")
pause()
def main():
""" entry point if module imported or run as
script """
load()
menu()
if __name__ == "__main__":
# runs program if executed as a script
main()
In: Computer Science
Suppose GDP equals $17 trillion, consumption equals $12.2 trillion, the government spends $3.5 trillion and has a budget deficit of $1.1 trillion.
Calculate public saving, taxes, private saving, national saving, and investment.
Now, assume that the government pursues its goal of updating the physical infrastructure of the economy (e.g. fixing roads, bridges, etc.). They decide to spend an additional $4 trillion on this endeavor (beyond their current spending). Use this new information to recalculate the totals from above for public saving, taxes, private saving, national saving, and investment (assuming GDP stays the same).
In: Economics
Suppose that government spending makes private firms more productive; for example, government spending on roads and bridges lowers the cost of transportation. This means that there are now two effects of government spending, the first being the effects discussed in this chapter of an increase in G and the second being similar to the effects of an increase in the nation’s capital stock K.
(a) Show that an increase in government spending that is productive in this fashion could increase welfare for the representative consumer.
(b) Show that the equilibrium effects on consumption and hours worked for an increase in government spending of this type are ambiguous but that output increases. You must consider income and substitution effects to show this.
In: Economics
Explain does why:
• On the basis of qual workability the surface characteristics of aggregate have a limited impact on the ultimate strength of concrete.
• the surface characteristics of aggregate have a clear impact on ultimate strength of concrete on the basis of qual water content.
• The cylinder strength is higher than that of cube's.
• The aspect ratio of concrete cylinders has no impact on compressive strength obtained in compression testing machine with brush platens.
• Concrete bridges should not be subjected to stress levels higher than 0.55 of ultimate strengths.
• the maximum aggregate size of aggregate have two opposing effects on concrete strength.
In: Civil Engineering
solve all questions below:
Please write with clear hand writing. Thank you.
In: Physics
You decide to do to determine the effect of used cigarette butts on water from Morses Creek, NJ and how it affects the water quality index. In the lab, you set up 3 large tanks of water from Morses Creek for the control group and 3 large tanks for the experimental group.
1. What is the independent variable in this experiment?
2. Name four dependent variables that you should measure.
3. What are three controlled variables?
4. Explain how you should set up the control group tanks. Then explain how you would set up the experimental group tanks.
In: Biology
1.Which of the following statements is NOT an explanation for how oxygen is released from oxy-hemoglobin.
A. Carbon dioxide has a stronger affinity than oxygen to heme and displaces oxygen in tissues.
B. The formation of carbonic acid lowers the oxygen affinity of hemoglobin in tissues.
C. The structure of deoxyhemoglobin is stabilized by the interaction with BPG.
D. Salt bridges are formed with N-terminal carbamates in deoxyhemoglobin.
E. Salt bridges are formed between acidic and basic side chains of His146 and Asp94, respectively in deoxyhemoglobin
2. Which of the following description of hemoglobin S (HbS) forming fibrous aggregates is FALSE?
A. Valine at position 6 of the β chains forms hydrophobic interaction with other HbS.
B. Formation of aggregates occurs more severely in homozygotes, i.e. both alleles carrying the mutation.
C. The aggregates distort the shape of the red blood cells.
D. The formation of aggregates occurs only in the deoxygenated form of HbS.
E. More aggregates are formed in the lungs.
3. Predict the possible outcome if HbS is stripped of BPG?
A. More tendency of HbS to form aggregates.
B. Less tendency of HbS to form aggregates.
C. No effect on HbS aggregation.
D. HbS form aggregates more rapidly.
E. The sickled cells clog blood capillaries more severely.
4. What would be the change of oxygen dissociation curve of the patient with sickle cell anemia, compared to that of a normal person?
A. Left shift
B. Right shift
C. Up shift
D. No change
E. Becomes hyperbolic
In: Biology
Question 2011 pts
What information do bridges use to determine whether to forward traffic?
Group of answer choices
MAC addresses
IP addresses
traffic conditions at the time
nothing because bridges forward all traffic
Question 2021 pts
A technician is at a small facility that has five computers connected to a central switch and accessing a single server for file and print sharing. One computer becomes unable to connect to the network, while the other four are still connecting properly. Which of the following could be causing the computer to not connect to the network?
Group of answer choices
The server has failed.
The computer's OS needs to be updated.
The switch has failed.
The NIC has failed
Question 2031 pts
Which of the following represents a layer-3 address?
Group of answer choices
www.gleneclarke.com
00-02-3F-6B-25-13
192.168.3.200
COMPUTER1
Question 2041 pts
Which of the following provides the longest cable run distance?
Group of answer choices
single-mode fiber
category 3 UTP
multi-mode fiber
Coax
Question 2051 pts
Which of the following best describes Logical Link Control (LLC)?
Group of answer choices
It is a Layer 1 protocol
It remembers the NICs MAC address
It is a sublayer of the Data Link layer
It controls open network sessions
Question 2061 pts
Routers function at which layer of the OSI model?
Group of answer choices
Physical
Network
Data Link
Transport
In: Computer Science
You are 10 months out from the upcoming hurricane season. You are the Emergency Planner for a mid-sized town in South Florida with several critical infrastructures. Your mayor has as asked you to plan and prepare for the possibility of a direct hitting storm during the upcoming season.
Based on the “Scenario Location” below, identify three key public- private partnerships critical to the emergency planning process in Sunny City and explain the importance of each one. Explain how you would establish and maintain communications with these partnerships throughout the emergency planning process.
Scenario Location:
Sunny City is a fictional mid-sized town in Southeastern Florida. It has a rich history of agriculture, including citrus groves and cattle farms and has been growing in population over the past decade. Route 1 passes through the center of town. There are several bridges over various waterways including two large bridges over the inter-coastal waterway. A privately operated electrical power plant is located near the inter-coastal waterway. Just west of town, a small regional commuter airport was recently built which has drawn in several businesses. Trying to keep up with the growing nature of the town, new communication hubs with fiber-optics have been put in and a waste water treatment facility was built. There is talk about increasing the width of some of the main roads to handle the build-up of traffic, but in the meantime Public Works has been working overtime to keep the roads maintained and operational
In: Operations Management
In 2018, the Westgate Construction Company entered into a
contract to construct a road for Santa Clara County for
$10,000,000. The road was completed in 2020. Information related to
the contract is as follows:
| 2018 | 2019 | 2020 | |||||||
| Cost incurred during the year | $ | 2,604,000 | $ | 4,032,000 | $ | 1,940,400 | |||
| Estimated costs to complete as of year-end | 5,796,000 | 1,764,000 | 0 | ||||||
| Billings during the year | 2,040,000 | 4,596,000 | 3,364,000 | ||||||
| Cash collections during the year | 1,820,000 | 4,000,000 | 4,180,000 | ||||||
Westgate recognizes revenue over time according to percentage of
completion.
rev: 09_15_2017_QC_CS-99734
Required:
1. Calculate the amount of revenue and gross profit (loss) to be recognized in each of the three years. (Do not round intermediate calculations. Loss amounts should be indicated with a minus sign.)
|
3. Complete the information required below to prepare a partial balance sheet for 2018 and 2019 showing any items related to the contract. (Do not round intermediate calculations.)
|
|||||||||||||||||||||||||||||||||||||||||
In: Accounting