Questions
Python ONLY ONE STATEMENT ALLOWED PER FUNCTION (ONE RETURN STATEMENT ALLOWED) def plsfollowrule(num): return num like...

Python

ONLY ONE STATEMENT ALLOWED PER FUNCTION (ONE RETURN STATEMENT ALLOWED)
def plsfollowrule(num):

return num

like this.

1) create a function popular. The dictionary called database contains each people's hobby and their excitement level. This function searches the dictionary and returns a list of that most popular hobby to least popular hobby. If multiple hobbies have the same number of popularity, follow alphabetical order.

#What is popular means? The dictionary contains each people's hobby. The programmer should search the dictionary and figure out how many times this hobby popular to the people.

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 popular(database) -> list:

#ONE STATEMENT ALLOWED, THAT WILL BE ONE RETURN STATEMENT

output

['Chess', 'Game', 'Tube', 'Baseball', 'Lottery', 'Punch']

#Chess appear the most time which 4

#Game appear 2 times

#Tube appear 2 times but by the alphabetical order, it located after game

#baseball appear 1 time

#lottery appear 1 time but by the alphabetical order, it located after baseball

#punch appear 1 time but by the alphabetical order, it located after lottery

In: Computer Science

home / study / engineering / computer science / computer science questions and answers / 2....

home / study / engineering / computer science / computer science questions and answers / 2. design an er-diagram for a bank that implements the following requirements. the database ...

Question: 2. Design an ER-diagram for a bank that implements the following requirements. The database you d...

2. Design an ER-diagram for a bank that implements the following requirements. The database you design should store information about customers, accounts, branches and employees

• Customer: Customers are identified by their SSN. For each customer we store a name, multiple phone numbers (one or more), and an occupation.

• Account: Accounts are identified by an account number and the branch they belong to. For each account we store a balance and the type of account (e.g., savings).

– An account belongs to one or more customers. A customer can have any number of accounts.

– An account belongs to exactly one branch. Obviously, branches can have multiple accounts (branches are not required to have accounts).

• Branch: A branch is identified by a unique branch code. For each branch we want to store a location and number of employees.

• Employee: Employees are identified by their SSN. For each employee we store a name and salary.

– An employee works for exactly one branch. Branches have one or more employees.

– An employee is the contact for zero or more customers. Every customer has at most one employee as a contact.                                                    [20 marks]

In: Computer Science

Choose from a-d the NoSQL store that best matches the description or need of each of...

Choose from a-d the NoSQL store that best matches the description or need of each of the following systems/applications (no need to explain the details).

a. Key-value store; b. Document database; c. Column-family database; d. Graph Database.

1. “We use this system to manage the LinkedIn professional network and it is effective at managing many complex social relationships.”
2. This music data system for P2P music sharing will be used to maintain a set of hash tables of a song’s id and its associated name. “
3. “This system will be used by banks and need to ensure strong ACID property and ensures consistency through transactions. “
4. “We need a fast and scalable client program to either get the value of an attribute, put a value of the attribute, or delete a value of that attribute. “
5. “We want to know which NoSQL is not a good choice for storing an e-commerce shopping cart. “
6. “This data system is very useful for storing cyber threat event information since they can easily store richly attributed events with various types. “
7. “Although we stored 1000 attributes for our financial center, we found most of the queries are read-only and they frequently access 10 most popular ones.”
8. “To support visualization and search of a geospatial map data, we need to store and retrieve a self-describing, hierarchical tree data structures. “

In: Computer Science

Given a relational database that consists of the following relations: Performer (pid: integer, pname: string, years_of_experience:...

Given a relational database that consists of the following relations:

Performer (pid: integer, pname: string, years_of_experience: integer, age: integer) Movie (mname: string, genre: string, minutes: integer, release_year: integer, did: integer) Acted (pid: integer, mname: string)
Director (did: integer, dname: string, earnings: real)

Do the following using your Azure SQL database:
a) Use SQL statements to create the relations.
b) Populate the relations using SQL statements with the given data posted on Canvas. c) Implement the SQL queries for the following:

  1. Display all the data you store in the database to verify that you have populated the relations correctly.

  2. Find the names of all Action movies.

  3. For each genre, display the genre and the average length (minutes) of movies for that genre.

  4. Find the names of all performers with at least 20 years of experience who have acted in a movie

    directed by Black.

  5. Find the age of the oldest performer who is either named “Hanks” or has acted in a movie named

    “The Departed”.

  6. Find the names of all movies that are either a Comedy or have had more than one performer act in

    them.

  7. Find the names and pid's of all performers who have acted in at least two movies that have the same

    genre.

  8. Decrease the earnings of all directors who directed “Up” by 10%.

  9. Delete all movies released in the 70's and 80's (1970 <= release_year <= 1989).

In: Computer Science

1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip...

1. The functional dependencies for the ProAudio relation:

c_id -> f_name, l_name, address, city, state, zip

item_id -> title, price

ord_no -> c_id, order_date

ord_no  + item_id  -> shipped

zip -> city, state

Original ProAudio relation:

c_id f_name I_name address city state zip ord_no item_id title price order_date shipped
01 Jane Doe 123 Elm St Ely NV 11111 1-1 12-31 More Blues 8.99 12-2-00 no
02 Fred Fish 321 Oak St Ely NV 11111 2-1 21-12 Jazz Songs 9.99 11-9-00 yes
01 Jane Doe 123 Elm St Ely NV 11111 1-2 12-21 The Blues 8.99 12-2-00 yes

determining functional dependencies for ProAudio database

Normalization is a set of rules that ensures the proper design of a database. In theory, the higher the normal form, the stronger the design of the database.

Use the file for Functional Dependencies Above to answer the following questions:

Now that you are familiar with the mission statement and the entities and attributes the for ProAudio:

  1. What are types of anomalies can occur when normalization has not taken place?
  2. Define Anomalies- definitions in your own words
    • Anomalie 1
    • Anomalie 2
    • Anomalie 3

In: Computer Science

View 2 Seneca Courses Inc. Product Spreadsheet All the course books are maintained on the following...

View 2

Seneca Courses Inc.

Product Spreadsheet

All the course books are maintained on the following Product spreadsheet. SCI is currently having difficulty searching for books written by the same author, and would like the new database system to list each author separately. There can be one or many authors for each book, but there is no limit to the number of authors of a book.

PROD

ID

TITLE

EDITION

Purchase Cost

Retail Price

AUTHOR

100860

DATABASE SYSTEMS: DESIGN AND IMPLEMENTATION

THIRD EDITION

$84.98

$99.98

CARLOS CORONEL,

PETER ROB

100861

DATABASE SYSTEMS: DESIGN AND IMPLEMENTATION

FOURTH EDITION

$92.82

$109.20

CARLOS CORONEL,

PETER ROB

100871

MODERN RETAILING

FOURTH EDITION

$88.36

$110.45

DANIEL CASTON,

JENNY TAPSCOTT

100890

UNDERSTANDING MICROSOFT ACCESS

NINTH EDITION

$65.52

$72.80

PIERRE LEBLAND,

ROBERT COBB

102130

ORACLE: INTRODUCTION TO PL/SQL

$53.24

$59.15

PHILIP ROBB

200376

ORACLE: ADVANCED PL/SQL DEVELOPMENT

$64.26

$71.40

PHILIP ROBB,

DAN CHEN

Business Rules:

1. PURCHASE COST the default value is 0.

2. RETAIL PRICE must always have a value.

Normalize the above user view. Document all steps including UNF, 1NF, Dependencies, 2NF, and 3NF and explain or list the primary key and foreign

In: Computer Science

Condensed statement of financial position and income statement data for Richetti Ltd. are shown below: RICHETTI...

Condensed statement of financial position and income statement data for Richetti Ltd. are shown below:
RICHETTI LTD.
Statement of Financial Position
December 31

(in thousands)
2018 2017 2016
Assets
Current assets
   Cash $28 $81 $200
   Accounts receivable 908 707 497
   Inventory 1,188 794 504
Total current assets 2,124 1,582 1,201
Property, plant, and equipment (net) 4,076 3,778 3,195
Total assets $6,200 $5,360 $4,396
Liabilities and Shareholders’ Equity
Liabilities
   Current liabilities $600 $553 $497
   Non-current liabilities 3,042 2,330 1,491
      Total liabilities 3,642 2,883 1,988
Shareholders’ equity
   Common shares 996 996 996
   Retained earnings 1,562 1,481 1,412
      Total shareholders’ equity 2,558 2,477 2,408
Total liabilities and shareholders’ equity $6,200 $5,360 $4,396
RICHETTI LTD.
Income Statement
Year Ended December 31

(in thousands)
2018 2017 2016
Sales (all on credit) $4,505 $4,019 $3,574
Cost of goods sold 2,483 2,109 1,797
Gross profit 2,022 1,910 1,777
Operating expenses 1,438 1,479 1,492
Income from operations 584 431 285
Interest expense 190 131 70
Income before income tax 394 300 215
Income tax expense 99 75 54
Net income $295 $225 $161

(a1)

Calculate the receivables turnover ratio, inventory turnover ratio, and current ratio for all three years. Assume that the accounts receivable and inventory balances at the end of 2015 were equal to the balances at the end of 2016. The company does not have an allowance for doubtful accounts and all sales are on credit. (Round answers to 1 decimal place, e.g. 5.2%.)

a-2

Gross Profit Margin rounded to one decimal place:

2016=%

2017=%

2018=%

a-3

Profit Margin rounded to one decimal place:

2016=%

2017=%

2018=%

a-4

Calculate the debt to total assets ratio and the times interest earned ratio (round to one decimal place

2016=___% ___times

2017=___% ___times

2018=___% ___times

In: Accounting

Strategic planning is a lot of work, but it is so important for hospitals and other...

Strategic planning is a lot of work, but it is so important for hospitals and other healthcare organizations. Why is it so crucial that hospitals conduct regular strategic planning sessions? Why must they develop a multiyear strategic plan document and update it annually? What would likely happen if a healthcare facility decided to discontinue strategic planning?

In: Nursing

create procedures you can use as a bookkeeper as part of your duties related to payroll....

create procedures you can use as a bookkeeper as part of your duties related to payroll.

include the following points:

Enter employee pay records.

Process payroll.

Reconcile payroll.

Update payroll records.

Payroll enquiries.

End of quarter.

End of financial year.

Back-up.

Complete payroll component of BAS.

In: Accounting

4. Suppose that the price of an asset at close of trading yesterday was $300 and...

4. Suppose that the price of an asset at close of trading yesterday was $300 and its volatility was estimated as 1.3% per day. The price at the close of trading today is $298. Update the volatility estimate using
(i) The EWMA model with λ = 0.94
(ii) The GARCH(1,1) model with ω = 0.000002, α = 0.04, and β = 0.94.

In: Finance