True / False
True / False
True / False
True / False
True / False
True/ False
Ture/ False
True/ False
True/ False
True/ False
True/ False
True/ False
True/ False
True/ False
True/ False
True/ False
True/ False
To reduce first costs of construction, structural design should be minimized without adversely affecting structural performance.
True/ False
In: Civil Engineering
Write a program that sorts prices of 10 tacos in ascending order based on the price, using arrays.
Requirements:
Example Output
Welcome to the taco price sorter! Enter 10 taco names and prices and I'll sort it!
Enter the name of taco 1
Crunchy Taco
Enter taco's price
1.19
Enter the name of taco 2
Crunchy Taco Supreme
Enter taco's price
1.59
Enter the name of taco 3
Soft Taco
Enter taco's price
1.19
Enter the name of taco 4
Soft Taco Supreme
Enter taco's price
1.59
Enter the name of taco 5
Chicken Soft Taco
Enter taco's price
1.79
Enter the name of taco 6
Crispy Potato Soft Taco
Enter taco's price
0.99
Enter the name of taco 7
Double Decker Taco
Enter taco's price
1.89
Enter the name of taco 8
Double Decker Taco Supreme
Enter taco's price
2.29
Enter the name of taco 9
Doritos Locos Taco (Nacho Cheese)
Enter taco's price
1.49
Enter the name of taco 10
Doritos Locs Tacos(Fiery) Supreme
Enter taco's price
1.89
Sorted Tacos are
Taco Prices Crispy Potato Soft Taco 0.99
Taco Prices Crunchy Taco 1.19
Taco Prices Soft Taco 1.19
Taco Prices Doritos Locos Taco (Nacho Cheese) 1.49
Taco Prices Crunchy Taco Supreme 1.59
Taco Prices Soft Taco Supreme 1.59
Taco Prices Chicken Soft Taco 1.79
Taco Prices Double Decker Taco 1.89
Taco Prices Doritos Locs Tacos(Fiery) Supreme 1.89
Taco Prices Double Decker Taco Supreme 2.29
In: Computer Science
Hydraulics & Hydrology
Problem Statement
The Romans were exquisite water engineers, and that without having at their disposal the modern tools and the knowledge we have today. Remember that Hydraulics and Hydrology as we know it now only came to be in the 1700’ when engineers started to put a fundamental framework together that is/was based on lab experiments and theoretical approaches and principles. Until then, you just “knew”. The Romans build all sorts of hydraulic systems, from irrigation canals, to water supply infrastructure, to the famed “hot baths” of Rome, to sewer systems, you name it. They realized that if you want water for different purposes at locations that were important to you that very often you had to get the water there because it just was not available in close proximity.
One of the marvelous feats they accomplished was to build water supply systems that would run over dozens of miles to convey water from sources to locations of need, typically the towns and cities they founded in their vast empire. They managed to do so by building a lot of infrastructure that withstood time and that, almost 2000 years later, is still in place for us to marvel at. Especially the many bridges that were built to cross valleys and gorges to keep the supply line flowing as an open channel are spectacular in their construction, such as the Pont du Gard, Segovia, and Aquila aqueducts.
Task:
In: Civil Engineering
Material covered:
(python language)
Problem statement
A single amoeba sits in a pitri dish. Every 5 minutes one of two things will happen to the amoeba:
1. There is a chance that the amoeba dies - producing no offspring.
2. If it does not die the amoeba splits into two amoebas.
make a function that simulates a single trial to calculate the lifespan of a colony of amoebas, given their chance of survival. Then, run that trial for some number of repeated trials (iterations).
To make this work, write the following functions. Test your functions fully before moving to the next one. You do not have to follow this order, but it is encouraged.
BUILD A PROGRAM USING THIS 4 STEPS.
1 - Calculate next generation
make a function that is passed the number of living amoebas, and the odds of survival - then calculates how many amoebas are alive in the next generation. Each amoeba in the population has a random chance of splitting, or dying. See the above random chance of dividing, or dying. Calculate the number of amoeba in the new generation.
2 - Single Trial
built a function that executes a single trial of the amoeba experiment. A trial is to simulate up to 20 generations of an amoeba colony. If there are no remaining amoebas, the function should exit without continuing calculating more generations.
This function should return a tuple that contains three pieces of data:
1. The number of iterations that were simulated.
2. A boolean indicates if all the amoebas are dead before 20 generations.
3. The final population.
3 - Repeat the trial
built a function that will repeat the trial function 1000 times, storing the output of the trial in numpy arrays. Print the report for these repeated trials. Your output should be to two decimal places.
Report on the percentage of colonies that did not survive (end with 0 amoebas), and the average number of generations for failed colonies. Finally, report on the average population size on successful populations.
4 - Repeat trials with different survival rates
Do many trials, using different survival rates. Start with a 50% survival rate, then report in intervals of 5 all the way up to 95% survival rate.
This piece can be in a function, but does not need to be.
Sample output - yours will vary in terms of numbers:
OUTPUT:
For survival odds 0.50:
The amoebas did not survive 93.70% of the time.
On failures, there were 2.83 generations on average.
If the amoebas did survive, the average population was 14.10
For survival odds 0.55:
The amoebas did not survive 80.10% of the time.
On failures, there were 2.71 generations on average.
If the amoebas did survive, the average population was 31.61
And so on, up to 95%
In: Computer Science
Task Intro: Password JAVA and JUnit5(UNIT TESTING)
Write a method that checks a password. The rules for the password are:
- The password must be at least 10 characters. - The password can only be numbers and letters. - Password must have at least 3 numbers.
Write a test class(Junit5/Unit testing) that tests the checkPassword method.
Hint: You can (really should) use method from built-in String class:
public boolean matches(String regex)
to check that the current string matches a regular expression. For example, if the variable "password" is the string to be checked, so will the expression.
password.matches("(?:\\D*\\d){3,}.*")
return true if the string contains at least 3 numbers. Regular expression "^ [a-zA-Z0-9] * $" can be used to check that the password contains only numbers and letters.
Let your solution consist of 4 methods:
checkPassword(string password) [only test this method] checkPasswordLength(string password) [checkPassword help method] checkPasswordForAlphanumerics(string password) [checkPassword help method] checkPasswordForDigitCount(string password) [checkPassword help method]
Intro: Password Criteria
The code is structured and formatted Your code uses the standard java formatting and naming standard, it is also nicely formatted with the right indentation etc.
Good and descriptive variable names Your code uses good variable names that describe the damped function, such as "counter" instead of "abc".
The code is logical and understandable
Your code is structured in a logical way so it's easy to understand what you've done and how to solve the problem. It should be easy for others to understand what your code does and how it works.
The solution shows understanding of the problem You show with your code that you have thought about and understood the problem. It is worth thinking about how you will solve the problem before you actually solve it
The code solves the problem Your code manages to do what is required in the assignment text, and it does not do unnecessary things either.
Unit tests (Junit5) cover all common use cases Unit tests for your code check all common ways it can be used, such as the isEven (int number) method being tested with even, odd, negative, and null, reverseString (String text) will be checked with regular string, empty string and zero object, etc.
The code uses Regex and built-in methods Do not try to reinvent the wheel, it is possible to check the text string for digits with a while / for loop, but using regex and matching function is much easier. There are many websites that help you find regex for what you need, so use them.
In: Computer Science
4. DNS hijacking is a common technique that is used by censors (i.e., networks who perform censoring actions), where fake DNS responses can be injected. As a DNS request could traverse a number of routers along the path, each router along the path could inject a fake DNS response. In the paper “The Collateral Damage of Internet Censorship by DNS Injection”, authors use a technique similar to traceroute to identify the router that actually injects the fake DNS response. Authors deliberately decrease the TTL (time-to-live) value in the IP header to monitor ICMP packet and fake DNS response to decide the router that injects fake response. In this paper, DNS is built on UDP. However, DNS can also be built on top of TCP. This expands the attack surface for attackers. Specifically, the censors inject RST packets to both the client and the server in one TCP connection if a DNS query in this connection carries “sensitive” information. Different from UDP, TCP requires three-way handshake. Therefore, the packet that carries sensative information (e.g., a TCP-based DNS query) will be the packet that comes later than packets for three-way handshake. Let us make the following assumptions for this question 1. We assume that DNS over TCP is using a publicly-known port number. 2. Censors are stateless, which means that they will not consider whether a TCP packet belongs to an established connection. They make decision based on each individual packet instead of packets belonging to the same connection. In order to make the method discussed in “The Collateral Damage of Internet Censorship by DNS Injection” to be useful in this new setting, we need to make a few changes of this method. Question: Please verify whether each of the following changes is needed or not (1 Point). And please justify your answer (1 Points). a. When you select a target IP to send honey queries, this IP should never respond you with TCP RST packets if you send a TCP-based DNS query to this IP. b. When you send out a honey query (a TCP-based DNS query with a sensitive domain) to a target IP, you can directly send this TCP-based DNS query to this target IP without establishing a TCP connection with the target IP (i.e., through 3-way handshake). c. You should now expect RST packets from the censor rather than a forged DNS response.
In: Computer Science
Mr Dumas is a famous French chef who moved from Paris to Sydney on 1 November 2018 to work for an Australian fine dining restaurant. His remuneration includes a salary of $350,000 plus $50,000 bonus per year and a contractual term of two years. Mr Dumas would be paid a lump sum of $500,000 in return for his promise that, if he resigns, he would not set up in a business in Sydney in competition with an Australian fine dining restaurant for 3 years. Mrs Dumas moved to Sydney with her husband and three children. Mr Dumas obtained permanent residence since 1 November 2018 and bought the following assets in Sydney: A vintage motor vehicle built in 1961: acquired on 15 November 2018 at a cost of $150,000. Mr Dumas intended it to be kept as a long-term investment. A family house in Chatswood: acquired on 1 December 2018 at a cost of $1,200,000 10,000 Shares in BHP: acquired on 1 January 2019 at a cost of $300,000 were sold for $320,000 on 15 May 2020. During the financial year 2020, Mr Dumas signed the contract with SBS TV channel around November 2019 and agreed to travel to New Zealand in December 2019 for filming The Food Show. The fee of $100,000 will be paid out to him once the show is released on TV in August 2020. On 1 May 2020, Mr Dumas sold the following overseas assets which he bought before he came to Australia: 30,000 shares in a USA company: acquired on 1 July 1982 at a cost of $15,000 and was sold for $35,000 on 1 May 2020. The market value was $6,000 as at 1 November 2018. An investment flat in Paris: acquired on 15 July 2018 at a cost of $230,000 and was sold for $200,000 on 1 May 2020. Mr Dumas still maintains a bank account at the Bank of Paris in France which earned a total of $8,500(2018/2019) and $10,000(2019/2020) in interest income. He neither repatriated nor declared any part of the interest derived in France because he has paid 15% withholding tax. Hence, at the time of lodging his Australian tax return, Mr Dumas declared his Australian sourced income only. Mr Dumas lodged his 2018/19 tax return on 15 August 2019 and received a notice of assessment on 25 October 2019. On 15 February 2020, he received a notice of amended assessment which included his Australian taxable income the amounts derived in French. The amended assessment required Mr Dumas to pay $4,250 additional tax to the ATO. Mr Dumas and his family decided to relocate to New Zealand indefinitely and left Australia on 30 June 2020 to set up a high-end restaurant. On 10 July 2020, he also received a lump sum payment of $500,000 under the terms of his remuneration package with his Australian employer.
Required: Under what circumstances and on what grounds could the ATO issue the amended assessment for the year 2018/2019?
What should Mr Dumas do if he decides to dispute this amended assessment, and what time limits would apply for the dispute to be commenced?
Advise Mr Dumas on what amounts may be included in his Australian taxable income for the 2019/20 tax year.
Calculate his taxable income for the year ending 30 June 2020.
In: Accounting
You will make many purchases online in order to benefit from greater convenience or lower—prices, but you will likely set foot in a brickand mortar retail store at least occasionally, and you may have noticedsome changes brought by technology. A few decades ago, large retail chains started introducing computerized point-of-sale inventory systems consisting of checkout computers and an inventory control system. A simple bar code scancaptures a sale, and the item is automatically deducted from the store’s inventory, allowing real-time tracking of purchases so that the retailer knows when to reorder merchandise or restock shelves. In addition to a speedier checkout process, such systems help to reduce stockouts, increasing customer satisfaction. In many grocery stores, this system has been taken a step further, allowing the customers to conduct the checkout process themselves, saving time and labor costs. In Switzerland, grocery retailer Migros introduced a system that allows customers to scan items as they are placed into the shopping cart. At the checkout counter, all the customer has to do is swipe a credit card.
In the near future, many items may be equipped with radio frequency identification (RFID) tags (see Chapter 8), eliminating the need to scan each individual item, so that the total price for a cart full of merchandise can becalculated within a second, saving even more time and adding convenience for the customer. Imagine the time you’ll save when all you have to do is pass with your cart through an RFID reader and swipe your credit card.
Payment systems are also changing. A new “Pay by Fingerprint” system allows customers to complete a purchase by placing a finger onto a fingerprint scanner without the need to sign a sales slip or enter a personal identification number (PIN ); this makes the checkout process extremely convenient and secure. Another innovative way to pay for a purchase is via mobile phone. Using a technology called near-field communication (NFC; similar to Bluetooth), the customer’s mobile phone communicates with the retailer’s payment terminal, and the payment amount is automatically debited from the customer’s bank account. NFC-based payment systems have already begun to be implemented; major smartphone manufacturers such as Samsung, Nokia, Motorola, and HT C actively support this new technology by integrating it into new handsets.
Further, many brick-and-mortar retailers have had to respond to the phenomenon of showrooming, in which, as discussed earlier, customers examine products in person at a store and then leave to order the same product online for less. Retailers invest billions to build and maintain their storefronts, and online retailers can often undercut physical stores’ prices; when a customer takes advantage of this, the brick-andmortar retailer cannot recoup the cost of the storefront. Some retailers like Best Buy and Target are embracing this trend, however, by encouraging consumers to browse their shelves and compare prices online. By providing perks such as superior, personal customer service and instituting price-matching policies, these retailers prevent loss of customers due to price while benefiting by selling additional products. Other new and exciting in-store technologies include smart fitting rooms that use augmented reality technology to show how an item would look when worn or suggest complementary items. Finally, retail stores are increasingly using Bluetooth-enabled sales beacons to provide customers with real-time promotional offers.
As you can see, information systems have had a huge impact on retailing, and many more changes are yet to hit the shelves.
You may make many purchases online in order to benefit from greater convenience or lower prices, but you will likely set foot in a brick-and-mortar retail store at least occasionally, and you may have noticed some changes brought by technology. A few decades ago, large retail chains started introducing computerized point-of-sale inventory systems consisting of checkout computers and an inventory control system. A simple bar code scan captures a sale, and the item is automatically deducted from the store’s inventory, allowing real-time tracking of purchases so that the retailer knows when to reorder merchandise or restock shelves. In addition to a speedier checkout process, such systems help to reduce stockouts, increasing customer satisfaction. In many grocery stores, this system has been taken a step further, allowing the customers to conduct the checkout process themselves, saving time and labor costs. In Switzerland, grocery retailer Migros introduced a system that allows customers to scan items as they are placed into the shopping cart. At the checkout counter, all the customer has to do is swipe a credit card.
In the near future, many items may be equipped with radio frequency identification (RFID) tags (see Chapter 8), eliminating the need to scan each individual item, so that the total price for a cart full of merchandise can be calculated within a second, saving even more time and adding convenience for the customer. Imagine the time you’ll save when all you have to do is pass with your cart through an RFID reader and swipe your credit card.
Payment systems are also changing. A new “Pay by Fingerprint” system allows customers to complete a purchase by placing a finger onto a fingerprint scanner without the need to sign a sales slip or enter a personal identification number (PIN ); this makes the checkout process extremely convenient and secure. Another innovative way to pay for a purchase is via mobile phone. Using a technology called near-field communication (NFC; similar to Bluetooth), the customer’s mobile phone communicates with the retailer’s payment terminal, and the payment amount is automatically debited from the customer’s bank account. NFC-based payment systems have already begun to be implemented; major smartphone manufacturers such as Samsung, Nokia, Motorola, and HT C actively support this new technology by integrating it into new handsets.
Further, many brick-and-mortar retailers have had to respond to the phenomenon of showrooming, in which, as discussed earlier, customers examine products in person at a store and then leave to order the same product online for less. Retailers invest billions to build and maintain their storefronts, and online retailers can often undercut physical stores’ prices; when a customer takes advantage of this, the brick-andmortar retailer cannot recoup the cost of the storefront. Some retailers like Best Buy and Target are embracing this trend, however, by encouraging consumers to browse their shelves and compare prices online. By providing perks such as superior, personal customer service and instituting price-matching policies, these retailers prevent loss of customers due to price while benefiting by selling additional products. Other new and exciting in-store technologies include smart fitting rooms that use augmented reality technology to show how an item would look when worn or suggest complementary items. Finally, retail stores are increasingly using Bluetooth-enabled sales beacons to provide customers with real-time promotional offers.
As you can see, information systems have had a huge impact on retailing, and many more changes are yet to hit the shelves.
Help with an Introduction & Summary!!!!! Please!
In: Computer Science
XYZ Corporation, an Australian based carmaker, is considering an expansion into Asia after its expansion into the US last summer was highly successful. Currently, XYZ does export cars to Asia, but the increased demand raises the question of an expansion in Asia. XYZ is trying to decide whether to establish a car manufacturing plant and office in Japan where cars would be built and then sold across Asia.
All relevant data is given in the tables below. The cost of the expansion is Yen 80,000,000, which must be immediately expended. Three-year EBITDA are 35,000,000 45,000,000 and 55,000,000 respectively. Moreover, XYZ would have to fund additional working capital of Yen 5,000,000 at the time of the expansion. Further investment in net working capital would be Yen 5,000,000, Yen 8,000,000, and Yen 10,000,000 in year 1, 2, and 3 respectively. If it builds the plant, XYZ will depreciate it at a rate of Yen 4,000,000 per year (starting in year 1) and will have to fund additional capital expenditures of Yen 8,000,000 per year to maintain and improve the plant. Although the project is assumed to have an infinite life, cash-flows are only projected up to three years and the terminal value of the project is computed based on the year 3 free cash-flow (FCF) assuming a growth rate that equals the Japanese long-run GDP growth rate.
All taxes are paid in Japan in the year the income is earned. Tax treaties are in effect so that XYZ will have no tax obligations to the Australian Tax Office (ATO). The following information applies to the valuation.
|
Japan |
Australia |
|
|
Price Inflation |
2.00% |
3.00% |
|
Annual return on government bonds |
3.00% |
4.00% |
|
Corporate tax rate |
40.00% |
30.00% |
|
Equity market risk premium AUD |
6.00% |
|
|
Spot rate-S(AUD/Yen) |
0.01 |
|
|
Before tax cost of debt |
5.00% |
|
|
Debt-to-value ratio (D/V) |
0.5 |
|
|
Systematic risk (beta) |
1.2 |
|
|
Japanese long-run GDP growth rate |
3% |
|
|
WACC |
12.80% |
Required:
In: Finance
The dataset for this assignment contains house prices as well as 19 other features for each property. Those features are detailed below and include information about the house (number of bedrooms, bathrooms…), the lot (square footage…) and the sale conditions (period of the year…) The overall goal of the assignment is to predict the sale price of a house by using a linear regression. For this assignment, the training set is in the file "house_prices_train.csv" and the test set is in the file "house_prices_test.csv"
Here is a brief description of each feature in the dataset:
I completed the code correctly for question 1a(Open the training dataset and remove all rows that contain at least one missing value (NA) & Return the new clean dataset and the number of rows in that dataset) but need help with the rest of the question. This is my code:
def clean_data():
import pandas as pd
data = pd.read_csv('house_prices_train.csv', index_col=0)
data_train = data.dropna()
nb_rows = data_train.shape[0]
return([nb_rows, data_train])
Question 1b:
For the training dataset, print a summary of the variables “LotArea”, “YearBuilt”, “GarageArea”, and “BedroomAbvGr” and “SalePrice”. Return the whole summary and a list containing (in that order):
Hint: Use the built-in method describe() for a pandas.DataFrame
Here's the sample code i was given to start off:
def summary(data_train):
# Code goes here
# max_sale = maximum sale price in the training dataset
# min_garea = mining garage area
# fstq_lotarea = first quartile of lot area
# scd_ybuilt = second most common year built
# mean_bed = mean number of bedrooms above ground
### YOUR CODE HERE
return([max_sale, min_garea, fstq_lotarea, scd_ybuilt,
mean_bed])
Question 1c:
Run a linear regression on "SalePrice" using the variables “LotArea”, “YearBuilt”, “GarageArea”, and “BedroomAbvGr”. For each variable, return the coefficient associated to the regression in a dictionary similar to this: {“LotArea”: 1.888, “YearBuilt”: -0.06, ...} (This is only an example not the right answer)
Compute the Root Mean Squared Error (RMSE) using the file "house_prices_test.csv" to measure the out-of-sample performance of the model.
################# Function to fit your Linear Regression Model
###################
def linear_regression_all_variables(data_train):
from sklearn import linear_model
# Code goes here
# dict_coeff = dictionnary (key = name of the variable, value =
coefficient in the linear
# regression model)
# lreg = your linear regression model
###
### YOUR CODE HERE
###
return([dict_coeff, lreg])
Question 1d:
Refit the model on the training set using all the variables and return the RMSE on the test set.
(The first column "unnamed: 0" is not a variable)
################# Function to compute the Root Mean Squared
Error ###################
def compute_mse_test(data_train, data_test):
from sklearn import linear_model, metrics
dict_coeff, lreg =
linear_regression_all_variables(data_train)
###
### YOUR CODE HERE
###
# rmse = Root Mean Squared Error
return(rmse)
def linear_regression_all(data_train, data_test)
from sklearn import linear_model, metrics
#Code goes here
#rmse = root mean squared error of the second linear regression on
the test dataset
###
### YOUR CODE HERE
###
rmse = np.sqrt(metrics.mean_squared_error(y_test, y_pred))
return (rmse)
In: Computer Science