Questions
Python pls 1. The function only allow having one return statement. Any other statements are not...

Python pls

1. The function only allow having one return statement. Any other statements are not allowed. You only have to have exactly one return statement.

For example

the answer should be

def hello(thatman):

return thatman * thatman

1. Create a function search_wholo function. This function returns a list of 2 tuples, which people and their excitement skills, and sorted by decreasing excitement level(highest excitement skill first). If two people have the same excitement level, they should appear alphabetically. The list includes people who have the same hobby as an argument, and greater than or equal to the excitement level(which argument also).

For example

database = {'Dio': {'Lottery': 2, 'Chess': 4, 'Game': 3},'Baily': {'Game': 2, 'Tube': 1, 'Chess': 3}, 'Chico': {'Punch': 2, 'Chess': 5}, 'Aaron': {'Chess': 4, 'Tube': 2, 'Baseball': 1}}

def search_wholo(database, hobby:str, num: int):

# ONLY ONE STATEMENT ALLOWED (RETURN STATEMENT)

search_wholo(database, 'Chess',4) -> [('Chico', 5),('Aaron', 4), ('Dio',4)]

search_wholo(database, 'Game',0) -> [('Dio', 3), ('Baily', 2)]

search_wholo(database, 'Tube',3) -> [] #because all people's excitement skill for tube is lower than 3

search_wholo(database, 'Gardening',3) -> [] #because there is no "gardening" hobby in the dictionary

In: Computer Science

This is a simple list table of a company trying to keep track of parts that...

This is a simple list table of a company trying to keep track of parts that they sell and orders that came in purchasing those parts (in other words, not a database but a flat one table file). You will design a database for this company so that they won’t be relying on a simple 1 table list system to keep track of their data. Looking at the table below, produce the 3NF of the data.

OrderNum

OrderDate

PartNum

Description

NumOrdered

QuotedPrice

21608

10/20/2010

AT94

Iron

11

$21.95

21610

10/20/2010

DR93

Gas Range

1

$495.00

21610

10/20/2010

DW11

Washer

1

$399.99

21613

10/21/2010

KL62

Dryer

4

$329.95

21614

10/21/2010

KT03

Dishwasher

2

$595.00

21617

10/23/2010

BV06

Home Gym

2

$794.95

21617

10/23/2010

CD52

Microwave Oven

4

$150.00

21619

10/23/2010

DR93

Gas Range

1

$495.00

21523

10/23/2010

KV29

Treadmill

2

Create the database in an actual database application (i.e Microsoft Access, MySQL or Oracle, etc.). You must use SQL commands to create the tables in the database (i.e Create Table command). Submit the SQL commands with the completed database as part of the assignment. The tables should be populated with records from the scenario you chose.

In: Computer Science

In 2000, The James Bond Company purchased all of the stock of the 007 Company at...

In 2000, The James Bond Company purchased all of the stock of the 007 Company at book value

James Bond accounts for this investment using the initial value method and 007 Company does not pay any dividends.
On 1/1/2015 The James Bond Company issued (sold) 400; 10% $1000 bonds for $440,000. These 20 year bonds pay interest
each July 1 and January 1.   James Bond Company uses straight line amortization for bond interest
On 1/1/2018 The 007 Company purchased all of these bonds in the open market for $417,000.  
007 Company uses straight line amortization for investment interest revenue
REQUIRED;
A) Make the journal entry James Bond Company makes when it sells the bonds in 2015
Cash            440,000
To Bonds            400,000
To Profit               40,000
b) Make the journal entry James Bond makes on July 1 2015 with the first interest payment
c) Make the journal entry 007 Company makes when it buys the bonds in 2018
d) Make the journal entry 007 Company makes on July 1, 2018 when it receives its first interest payment
e) Make the worksheet entry needed in 2018 connected with these bonds
f) In 2018 James Bond reported unconsolidated income of $600,000 and 007 Company reported income of $80,000. What is consolidated income?
g) Make the worksheet entry needed in 2019 connected with these bonds
h) In 2019 James Bond reported unsolidated income of $600,000 and 007 Company reported income of $80,000. What is consolidated income?

In: Accounting

In 2000, The James Bond Company purchased all of the stock of the 007 Company at...

In 2000, The James Bond Company purchased all of the stock of the 007 Company at book value. James Bond accounts for this investment using the initial value method and 007 Company does not pay any dividends.

On 1/1/2015 The James Bond Company issued (sold) 400; 10% $1000 bonds for $440,000. These 20 year bonds pay interest each July 1 and January 1. James Bond Company uses straight line amortization for bond interest

On 1/1/2018 The 007 Company purchased all of these bonds in the open market for $417,000. 007 Company uses straight line amortization for investment interest revenue

REQUIRED:

A) Make the journal entry James Bond Company makes when it sells the bonds in 2015

B) Make the journal entry James Bond makes on July 1 2015 with the first interest payment

C) Make the journal entry 007 Company makes when it buys the bonds in 2018

D) Make the journal entry 007 Company makes on July 1, 2018 when it receives its first interest payment

E) Make the worksheet entry needed in 2018 connected with these bonds

F) In 2018 James Bond reported unconsolidated income of $600,000 and 007 Company reported income of $80,000. What is consolidated income?

G) Make the worksheet entry needed in 2019 connected with these bonds h) In 2019 James Bond reported unsolidated income of $600,000 and 007 Company reported income of $80,000. What is consolidated income?

In: Accounting

P Q TR MR MC TC PROFIT 2000 0 0 2000 -2000 1900 1 1900 1900...

P Q TR MR MC TC PROFIT
2000 0 0 2000 -2000
1900 1 1900 1900 600 2600 -700
1800 2 3600 1700 400 3000 600
1700 3 5100 1500 100 3100 2000
1600 4 6400 1300 100 3200 3200
1500 5 7500 1100 300 3500 4000
1400 6 8400 900 600 4100 4300
1300 7 9100 700 900 5000 4100
1200 8 9600 500 1200 6200 3400
1100 9 9900 300 1600 7800 2100
1000 10 10000 100 2000 9800 200
900 11 9900 -100 2600 12400 -2500

f) If this firm shuts down in the Short Run, determine its profit maximizing/loss minimizing profit amount. Please explain your answer.

g) What should this firm do in the Short Run in order to maximize its profits/minimize its loss (produce or shut down)? Please explain your answer using numbers.

h) Explain what this firm should do in the Long Run. Why?

Declare whether each below is True or False. If you say False for any statement, you must explain clearly your reason for answering False in order to receive credit.

f) Since Monopolies have no competition, they will not pay for advertising.

g) The market sets the price for Oligopolies.

h) Product Differentiation provides no benefit to society.

In: Economics

Last weekend I tried to water ski for the first time in my life. I ended...

Last weekend I tried to water ski for the first time in my life. I ended up with a sprained lower back? What organ systems have suffered damage? [with citations ]


A patient comes into the hospital complaining of severe pain in the right side of her abdomen. A nurse palpates her right region and notes the location of the pain on the chart as  being the RLQ. What possible organs could be the source of the pain? [with citation]


You are told to dissect a pig into two equal left and right halves.  What plane would your incision be in? [with citations ]


A construction worker fell off a building and landed on a vertical steel rod. The rod was said to have ruptured his left pleural membrane. The man is also complaining of congestion in his chest. What organs are immediately affected by this rupture? What do you expect would draining into his thoracic cavity, what term describes this condition?[ with citations ]


In: Anatomy and Physiology

this is code to Temperature and Humidity Monitoring over ThingSpeak using Arduino UNO and ESP8266 i...

this is code to Temperature and Humidity Monitoring over ThingSpeak using Arduino UNO and ESP8266 i need someone explain the steps for me

#include <stdlib.h>

#include <DHT.h>

#define DHTPIN 5         // DHT data pin connected to Arduino pin 5

#define DHTTYPE DHT11     // DHT11 (DHT Sensor Type )

DHT dht(DHTPIN, DHTTYPE); // Initialize the DHT sensor

#define SSID "WiFi Name"     // "WiFi Name"

#define PASS "WiFi Password"       // "Password"

#define IP "184.106.153.149"// thingspeak.com ip

String msg = "GET /update?key=Your API Key"; //change it with your key...

float temp;

int hum;

String tempC;

int error;

void setup()

{

Serial.begin(115200); // use default 115200.

  Serial.println("AT");

delay(5000);

if(Serial.find("OK")){

    connectWiFi();

}

}

void loop(){

   start:

error=0;

temp = dht.readTemperature();

hum = dht.readHumidity();

char buffer[10];

tempC = dtostrf(temp, 4, 1, buffer);

updateTemp();

if (error==1){

    goto start;

}

delay(5000);

}

void updateTemp(){

String cmd = "AT+CIPSTART=\"TCP\",\"";

cmd += IP;

cmd += "\",80";

Serial.println(cmd);

delay(2000);

if(Serial.find("Error")){

    return;

}

cmd = msg ;

cmd += "&field1=";  

cmd += tempC;

cmd += "&field2=";

cmd += String(hum);

cmd += "\r\n";

Serial.print("AT+CIPSEND=");

Serial.println(cmd.length());

if(Serial.find(">")){

    Serial.print(cmd);

}

else{

    Serial.println("AT+CIPCLOSE");

    //Resend...

    error=1;

}

}

boolean connectWiFi(){

Serial.println("AT+CWMODE=1");

delay(2000);

String cmd="AT+CWJAP=\"";

cmd+=SSID;

cmd+="\",\"";

cmd+=PASS;

cmd+="\"";

Serial.println(cmd);

delay(5000);

if(Serial.find("OK")){

    return true;

}else{

    return false;

}

}

In: Physics

You’ve implemented the Academic Database in a local school in your community. The school’s administrator decides,...

  1. You’ve implemented the Academic Database in a local school in your community. The school’s administrator decides, there’s no need for database backup and recovery plan because all their computers are new. Explain in 100 to 150 words why there needs to be a disaster recovery plan.

In: Computer Science

Assignment 7: Congressional Vote Tracking Database Description Design an Extended E-R schema diagram for keeping track...

Assignment 7: Congressional Vote Tracking Database

Description

Design an Extended E-R schema diagram for keeping track of information about votes taken in the U.S. House of Representatives and Senate during the current two-year congressional session.  The database needs to keep track of each U.S. STATE's Name (e.g. Texas, New York, Pennsylvania, etc.) and include the Region of the state (whose domain is {North-east, Midwest, Southeast, West}).  Each CONGRESSPERSON in the House of Representatives is described by his or her Name, plus the District represented, the StartDate and EndDate for each term that the congressperson was elected, and the political Party to which he or she belonged when elected (whose domain is {Republican, Democrat, Independent, Other}). Each CONGRESSPERSON in the Senate is elected statewide, 2 senators per state, for six-year terms. The database should capture each CONGRESSPERSON's participation on committees and track committee votes, House votes, and Senate votes on bills made by each CONGRESSPERSON. For each vote taken on a bill, the database should capture whether or not the vote passed, the numbers of Yeas, Nays, Abstains, and Absences. The database should also record the President's decision to either pass the bill into law or veto the bill.

The database keeps track of each BILL (i.e., proposed law), including the BillName, the DateOfVote on the bill, whether the bill PassedOrFailed (whose domain is {Yes, No}), and the Sponsor(s) (the congressperson(s) who sponsored - that is, proposed - the bill).  The database keeps track of how each congressperson voted on each bill (domain of vote attribute is {Yes, No, Abstain, Absent}).  Draw an Extended ER schema diagram for this database application.  Express all constraints such as cardinality ratios, disjoint vs. overlapping specializations, and full vs. partial participation constraints.  State clearly any assumptions you make.

Tasks & Deliverables

  1. Draw the Extended E-R Diagram
  2. Map EER to Relational Schema using the 8-Step Mapping Algorithm

In: Advanced Math

1. You are a manager at a clothing manufacturing firm. One of your machines has just...

1. You are a manager at a clothing manufacturing firm. One of your machines has just broken down. You are trying to decide between the following two options. Compute the net present value of each to identify the best choice. Assume the interest rate is 5%.

a. Pay $2000 to repair the machine. If you do this, the machine will produce 10,000 units this period and next period. Each unit sells for $50.
b. Pay $5000 to buy a new, modern machine. If you do this, the machine will produce 12,000 units this period and next period. Each unit sells for $50.

2. You are an entrepreneur-landlord. You have a vacancy at one of your strip malls. You are trying to decide between the following two options. Compute the net present value of each to identify the best choice. Assume the interest rate is 3%.

a. Pay $6,000 to update the space, and then rent it out on a 5-year lease for $6500/year.  
b. Pay $20,000 to update the space to service one of your own businesses. You expect the business to produce an annual profit of $10,000.

3. You are a broker-buyer for a venture capitalist firm. It’s your job to buy new businesses, financing them using a mixture of bank loans and the firm’s resources. The bank always demands a 9% return on loans to your firm, and your firm has a 18% return minimum on its own capital. A new business idea is presented to you. The business costs $800,000 to establish. The bank is willing to finance 35% of this with your firm using its own capital for the rest. The business expects to make $100,000 per year (projected). Use the weighted average cost of capital to identify whether or not this is a good deal.

In: Finance