Categories
Code

Do not use inline style commands as is prevalent in word press web pages.

The objective of this assignment is to get real world experience with building web sites.
Build the following web site called – Brewery FX Web Site. When you finish the assignment make sure all your html code and your css code is formatted to look well organized and please upload a zip file of ALL files in the folder for your solution, see in class notes on how to do this.. Also before you submit please format all the html and css files source code and save, then Zip up the Entire folder to submit. Make a folder called “images” to store all images used in this web site. Make sub folders in the images folder for BeerSigns, BeerCans, BeerBottles, BeerCoasters, BeerTrays, Beer Labels, and HomeImages. Make a folder called “CSS” for all css files. Build your own css files based upon the css files you have seen in previous assignments. Do Not use inline style commands as is prevalent in Word Press web pages. The owner of the web site wants people to email him pix and descriptions of collectibles that they want to sell. Also the collectibles that are on the site are for sale.
You can view this site to see how it works currently:
The actual web site is http://www.breweryfx.com/ Links to an external site..

Categories
Code

When a person moves their pointer over a picture card, then the card gets a shadow of rgba(0, 0, 0, .3) with a 0px horizontal offset, 2px vertical offset, and a blur radius of 4px.

Form specification: Your page needs to have a form that…
… has a method attribute with the value of “post” and an action attribute with the value of “/pets”
… has an single-line text input with and id of “name”, a name of “pet_name”, and with an associated label that reads “Name”.
… has a drop-down with an id of “type”, a name of “pet_type”, an associated label that reads “Type”, with only the options “Cat”, “Dog”, “Hamster”, “Other”, “Zebra”.
… has a multi-line text input with and id of “bio”, a name of “pet_bio”, and an associated label that reads “Biography”
… has an email input with id of “owner-email”, a name of “pet_owner_email”, and with an associated label that reads “Owner’s Email”
… has a button that reads “Create new pet” with type “submit” and id “new-pet-submit-button”
… has a button reads “Reset” with type “reset”
… is 600px wide when the screen is greater than or equal to 600px wide
… uses grid layout to layout labels and form elements when the screen is greater than or equal to 600px wide
… is the width of the screen when the screen is less than 600px wide
… lays out the labels and form elements as full width when the screen is less than 600px wide
Picture card: Create a picture card that looks SIMILAR to this. There are images available in the “images” directory to assist you in making this card. They are not the same images, but there is an image of a desert and a person.
Picture card
In this screenshot, the title is “Title goes here”, the secondary text is “Secondary text”, and the body text is “Greyhound divisively hello coldly wonderfully marginally far upon excluding.”
The card’s root element is a
with a class of “card”.
The card is 344px wide.
The desert picture is 194px tall.
The padding between the body text and everything else is 16px.
The color of the title text is #000.
The color of the secondary and body texts is #232F34.
The size of the person picture is 40px in diameter.
The size of the body text is 11px.
The size of the title is 22px.
For the padding or margin around any other elements, use your best judgment to make it look like the screenshot.
Transitions
When a person moves their pointer over a picture card, then the card gets a shadow of rgba(0, 0, 0, .3) with a 0px horizontal offset, 2px vertical offset, and a blur radius of 4px.

Categories
Code

Describe the input(s), output(s) and the process of the algorithm.

Overview. This assignment will allow you to practice algorithmic thinking and basic Python programming with several small-scale problems. As you solve each problem, follow the steps of algorithmic thinking as outlined below. Use this template to complete the assignment.
Step 1: Algorithm Description. Include a step-by-step algorithm accompanied by either a flowchart or a Pseudo code to develop and express your steps that accomplish the given task . Remember, you have to be very explicit and clear to make sure one can actually achieve the task following your directions. Describe the input(s), output(s) and the process of the algorithm.
NOTE: To import a picture, for example, “image.png” to your Jupyter notebook, you can use the following block of code from IPython.display import ImageImage(“my_image.png”)
**Step 2: Program Code – Implementation: **Implement the algorithm in Python using the basic structures we covered in class (feel free to use additional ones):
User input
Variables
Operators
Conditional execution
Functions
Modules
Data structures: Lists, strings, tuples, sets, dictionaries
**Step 3: Program Testing: **Create a Test Plan with enough test cases that demonstrate your code works as intended. Explain how you used these test cases in your comments.
**Step 4: Program Documentation: **Be sure to comment thoroughly so that it is clear that you understand what every line of the code is intended to accomplish.
Problems
**Problem 1. **Write a function to calculate the cost of a trip to a theme park, which includes the cost of the hotel, car rental, and park tickets.
a. Define a function to calculate the cost of the hotel. The function should allow the user to choose one of the room types below and enter the length of their stay. The function then calculates the cost accordingly.
Standard room: 150$ per night
Deluxe room: 180$ per night
Suite: 220$ per night
b. Define another function to calculate the cost of renting a car. Rental cars charge
100$ up to 24 hours and 60$ added for each additional day.
c. Define a third function to calculate the cost of parking at the theme park. The cost of parking is 175$ for the first day and 50$ for each additional day.
d. Your final function should calculate the total cost of the theme park trip by calling the three functions above and summing their results.
Problem 2.
Write a function that asks the user to enter their exam scores in their History, Math, Language Arts, and Social Science classes and save the scores in a dictionary.
Example.
{“History”: [56, 75, 25], “Math”: [75, 85, 95, 65], “Language Arts”: [43, 32, 25], “Social Studies”: [90, 100, 95, 80]}
Return the user the two following dictionaries:
Calculate the average score for each class and save it in a new dictionary.
Next convert the average scores into letter grades based on the following scale and save the letter grades in another dictionary.
score > 90: A
75 < score <= 90: B
60 < score <= 75: C
score <= 60: D
Problem 3.
Write a function that accepts positive integers until the user enters “quit” and splits the numbers into three lists: the first one contains all the numbers, the second one contains all even numbers, and the third one contains all odd numbers. The function should return all three lists as well as the minimum and the maximum numbers in each list.
Your function should prompt the user to enter a positive number if they enter a negative value.
Your assignment submission needs to include the following resources:
A .pdf file must be the first resource and it will include all the answers to the questions above, including all the python code you produce. Make sure that you submit a neat, clearly presented, and easy-to-read .pdf. The .pdf should be submitted under the name file “student_name.pdf”.
Your second resource must be a single Jupyter Notebook with extension .ipynb (please see Figure below) and named “student_name.ipynb”. Zip your .pdf and .ipynb files.
***You need to submit two files: (1) pdf file from the first step and (2) the zip file from the second step.
Assignment Information
Weight:
20%
Learning Outcomes Added
ComputationalTools: Apply computational terminology and tools appropriately in different quantitative contexts.
AlgorithmicStrategies: Demonstrate the ability to think logically and systematically about problems, breaking them down into a clear, ordered set of concrete steps that could be implemented by a machine.
CompProgramDesign: Generate working programs in a computer language that can solve computational problems; find and fix bugs that appear in them.
QuantCommunication: Communicate with a clear and precise style that is suited to an appropriate audience. Produce code that can be easily read and understood by others.
Submit
Your submission has not yet been submitted or finalized.
Submit

Categories
Code

Why is it useful to store multiple pieces of information?

Arrays are commonly used to store data items. Arrays can be managed in ways that fill, iterate over, add to, and delete items from the array.
Respond to the following in a minimum of 175 words:
Why is it useful to store multiple pieces of information?
Provide a code example that supports your comments.
Intial Post 175 words
Also respond in 75 words
Arrays are really useful for taking multiple inputs in and having a way to organize and store the data. After arrays receive the data, the code can be set up to pull in either left to right, or right to left, or specifically choose what block to take from. Arrays are created with a specific size at the start of the code, arrays can not be extended or shortened during execution (at least in Java), however in Java array Lists can be extended and shortened due to the differing nature of the code. Arrays are often connected to file-based inputs, where the code reads from a selected file to get the data for the code to execute. A while loop can be used till each array spot has been assigned requesting an input each time, or increment up based on a desired amount.
When I think of arrays, I think of spreadsheets, which with multiple arrays you can assign code as though it where a spreadsheet. An example of an array in code I know of is a project I had in a prior class before I enrolled in University of Phoenix and changed major; The code used 2 separate arrays and iterated between them. The project was designed to take from a pre-setup file with earnings for each month in the company, and with that information we had to assign each months earnings into an array, and then calculate each value for taxable income each month, and store those values in a second array. We then took each value stored, got the minimums and maximums and exported all the data to a new file.
Response 2/ 75 words
An array requires memory space only for the values, the start address and its length.
In an array, values are near each other in memory. They can be accessed easily from CPU to cache. This brings to a conclusion that iteration over an array is much faster than any other iteration.
When it come to check if an index is valid or not in an array, it has its specified indexes and hence optimal to use. It can be directly traversed with the index position.
Memory can be allocated dynamically in an array. This advantage of an array helps to save the memory of the system. It also helps when the pre-defined array has insufficient memory. At runtime, memory can be allocated manually during run time. Also, when memory allocation is not dynamic, it stored the data in contiguous memory locations. The amount of storage required depends on the data type or size.
C function to Search an element in an array:-
int findElement(int array[], int size, int keyToBeSearched)
{
int i;
// Finding & returning the position of the element
for (i = 0; i < size; i++)
if (array[i] == keyToBeSearched)
return i;
return – 1;
}

Categories
Code

Choose the appropriate chi-square test to determine if some zodiac signs are over-represented in the heads of large companies.

1. Zodiac.txt of 256 heads of the largest 400 companies.
The data shows the number of births for each sign. Choose the appropriate Chi-square test to determine if some zodiac signs are over-represented in the heads of large companies.
2. Analgesics of a pain relief medicine for migraine headache sufferers. For the experiment, 27 volunteers were selected and 9 were randomly assigned to one of three drug formulations. The subjects were instructed to take the drug during their next migraine headache episode and to report their pain on a scale of 1 = no pain to 10 = extreme pain 30 minutes after taking the drug. Perform a one-way ANOVA to determine if any of the medications performed better than the others. If yes, perform a Tukey’s HSD to determine which was/were significantly different.
3. tvwatching.txt attempted to find out whether men and women watch the same amount of TV, on average and whether it mattered if students were varsity athletes or not. Student researchers asked 200 randomly selected students questions about their backgrounds and about their television-viewing habits and received 197 legitimate responses. The researchers found that men watch, on average, about 2.5 hours per week more TV than women, and that varsity athletes watch about 3.5 hours per week more than those who are not varsity athletes. But is this the whole story? To investigate further, they divided the students into four groups: male athletes (MA), male non-athletes (MNA), female athletes (FA), and female non-athletes (FNA). Perform a two-way ANOVA to determine if any of the medications performed better than the others. If yes, perform a Tukey’s HSD to determine which was/were significantly different.

Categories
Code

7) create a new repository in github called a08.

Once you have completed the assignment in exercise 3-1, do the following:
1) Create a new repository in GitHub called A07. Use a capital A in A07 as it makes a difference.
2) Create other files as needed for references to images, stylesheets, etc.
3) Upload the index.html, other html files such as sorkin.html, image and support files to the Github Repository
4) The files for this assignment are included in the starter files for this assignment.
5) Follow the instructions in the attached PDF file for Exercise 4-1.
6) You MUST change the copyright information to have the correct due date and your name.
7) Create a new repository in GitHub called A08.
8) Upload your files to your repository A08 and any other subfolders you have created.
9) Follow the instructions in the attached PDF file for Exercise 5-1.
10) You MUST change the copyright information to have the correct due date and your name.
11) Create a new repository in GitHub called A09.

Categories
Code

What are the key objectives?

Use hadoop
Complete a team project, which demonstrates your ability to work in a team to design and solve a bigdata problem. Guidelines:
o Work in self-assembled teams of one to three students.
o Devise your own case study and data set to work on.
o Identify outcomes of that you intend to do and why.
o Project idea must be preapproved prior to beginning work.
Required artifacts for submission:
1. Project overview document: What is the project about? What are the key objectives?
2. Docker-compose.yml file that sets up the services you will use in your project. If your project
uses the cloud, then the command line steps to deploy/undeploy the resources in the cloud.
3. Accompanying code.
4. A slide deck of your presentation to outline project, goals, architecture, outcomes, and lessons
learned.

Categories
Code

What are the key objectives?

Complete a team project, which demonstrates your ability to work in a team to design and solve a bigdata problem. Guidelines:
o Work in self-assembled teams of one to three students.
o Devise your own case study and data set to work on.
o Identify outcomes of that you intend to do and why.
o Project idea must be preapproved prior to beginning work.
Required artifacts for submission:
1. Project overview document: What is the project about? What are the key objectives?
2. Docker-compose.yml file that sets up the services you will use in your project. If your project
uses the cloud, then the command line steps to deploy/undeploy the resources in the cloud.
3. Accompanying code.
4. A slide deck of your presentation to outline project, goals, architecture, outcomes, and lessons
learned.

Categories
Code

Use a capital a in a07 as it makes a difference.

Once you have completed the assignment in exercise 3-1, do the following:
1) Create a new repository in GitHub called A07. Use a capital A in A07 as it makes a difference.
2) Create other files as needed for references to images, stylesheets, etc.
3) Upload the index.html, other html files such as sorkin.html, image and support files to the Github Repository
4) The files for this assignment are included in the starter files for this assignment.
5) Follow the instructions in the attached PDF file for Exercise 4-1.
6) You MUST change the copyright information to have the correct due date and your name.
7) Create a new repository in GitHub called A08.
8) Upload your files to your repository A08 and any other subfolders you have created.
9) Follow the instructions in the attached PDF file for Exercise 5-1.
10) You MUST change the copyright information to have the correct due date and your name.
11) Create a new repository in GitHub called A09.

Categories
Code

Do not hard code

Take several mystery sorting algorithms and determine which ones they are by experimentation.
The object file mysterysorts.o contains six sorting algorithms, which you can use by calling the
mysterySort function with an array, its length, and an integer between 0 and 5 to indicate which
algorithm to use. The function is designed to take an array of numbers and order the elements into
ascending order using the particular algorithm. More specifically, the algorithms used are:
Bubble sort
Insertion sort
Selection sort
Heap sort
Merge sort
Quicksort (where the first element of the array is used as the pivot for partitioning.)
Your job as the sorting detective is to figure out which algorithm is implemented by each mystery sort.
Below are some techniques you may use.
First, you can interrupt the sort and observe how the values are being moved around the array. Read
the comments of the provided header file mysterysorts.h that tells you how you can control the
number of steps performed by the algorithm. You should then check whether the behavior of the
algorithm matches the known behavior and invariants of the particular sorting algorithms. You must
use randomly generated arrays for these tests, not hard coded arrays.
Secondly, you can time the sorting algorithms and get an overall idea of their performances. A way to
measure elapsed system time for programs is to use function gettimeofday(). If you record the
starting and finishing times in the timeval structures start and finish, you can compute the
time elapsed in microseconds as demonstrated in the starter file named demo.c .
To perform this task you will need to complete the time_category and classify functions in the
file detective.c . They should take a number for algorithm to select and use one or more calls to
mysterySort with that algorithm number to determine which algorithm it is using. Do not hard code
your conclusions of which algorithm is which, but write code to analyze the algorithm’s behavior and
determine which algorithm it is. Grading tests will be run with the algorithms being assigned different
numbers.
2
Note that the object file mysterysorts.o is compiled on the CS department servers under Linux, so
it may not be compatible with your home machine.