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. 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 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:
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:
Display all the data you store in the database to verify that you have populated the relations correctly.
Find the names of all Action movies.
For each genre, display the genre and the average length (minutes) of movies for that genre.
Find the names of all performers with at least 20 years of experience who have acted in a movie
directed by Black.
Find the age of the oldest performer who is either named “Hanks” or has acted in a movie named
“The Departed”.
Find the names of all movies that are either a Comedy or have had more than one performer act in
them.
Find the names and pid's of all performers who have acted in at least two movies that have the same
genre.
Decrease the earnings of all directors who directed “Up” by 10%.
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
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:
In: Computer Science
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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In: Accounting
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.
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 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