ICE 10
.pdf
keyboard_arrow_up
School
University of the Fraser Valley *
*We aren’t endorsed by this school
Course
205
Subject
Computer Science
Date
Dec 6, 2023
Type
Pages
6
Uploaded by JudgeOxidePorpoise6
11/20/23, 2:23 PM
Quiz: In-class Exercise (ICE) 10
https://canvas.ubc.ca/courses/123136/quizzes/656313/take
1/6
In-class Exercise (ICE) 10
Started: Nov 20 at 2:22p.m.
Quiz Instructions
As long as you're online, your responses to this exercise will be automatically saved as you work
through it. You may attempt this exercise as many times as you wish before the deadline, but be aware
that only the final attempt's grade will be recorded. Canvas will automatically submit any incomplete
attempts when the deadline arrives. Please note, if you've already submitted an attempt and do not plan
to make another, avoid starting a new one. Canvas will auto-submit the most recent attempt you
initiated, and this will be the attempt that is graded.
Assume that you start each question with a fresh R session. Also assume that you loaded all the
necessary libraries. For instance, if you happen to use a function from
tidyverse
, you should assume
that it was successfully loaded in that fresh session.
1 pts
Question 1
The iris data set is a built-in data set in R. Some information can be found
here
(https://en.wikipedia.org/wiki/Iris_flower_data_set)
. You can type
head(iris)
on R
console to take a look at
the first few rows
of this data frame. Each observation in the
data set reports dimensions of a flower and its species.
Questions
1-5 will be based on this data set. You can access to any column of the iris
data set by using
$
sign (e.g.,
iris$species
allows you to access to the species
column of the iris data set)
The data set has
rows (i.e., observations) and
columns (i.e., variables).
Note that row index is not a column. Columns have names associated with them.
1 pts
Question 2
11/20/23, 2:23 PM
Quiz: In-class Exercise (ICE) 10
https://canvas.ubc.ca/courses/123136/quizzes/656313/take
2/6
Answer the following questions by rounding the value obtained to its
first
decimal
place (you can use
round()
function). Enter the value not the R code:
i) The maximum value of
Sepal.Length
:
ii) The minimum value of
Sepal.Width
:
iii) The average value of
Petal.Length
:
iv) The standard deviation of
Petal.Width
:
1 pts
Question 3
You would like to know the species of the flower which has a petal width of 1.7 and a
petal length of 5.
The code you decided to run is:
iris$Species[
(iris$Petal.Width
1.7
iris$Petal.Length==5)]
Please fill in each blank with either a function name or a logical operator (i.e., ==, >,
<, !, &, |, etc.).
1 pts
Question 4
11/20/23, 2:23 PM
Quiz: In-class Exercise (ICE) 10
https://canvas.ubc.ca/courses/123136/quizzes/656313/take
3/6
You would like to know the number of flowers (observations) whose petal length is
less than or equal to 4.5.
Then you can run:
(iris$Petal.Length
4.5)
Please complete the formula by filling in each blank with a function name or logical
operator.
2 pts
Question 5
You would like to create a new column that is the ratio of petal length to petal width.
Thus, you run:
iris$ratio <- iris$Petal.Length
iris$Petal.Width
After the creation of the
ratio
variable (i.e., column), you would like to know the
average value of ratio values
for
the versicolor species (note: versicolor is one of the
three species of flowers included in this data set).
Then you would run:
(
[
(iris$Species == "
" ) ] )
Please fill in each blank with a function name,
appropriate
column name (in the form
of data frame name, $ sign, and a column name), arithmetic operator, logical
operator, or string.
1 pts
Question 6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Create automatic. Html page.
arrow_forward
Transcribed Image Text
RunRoutr is a fitness tracking application for smartphones that creates suggested running routes so that users can run with each other. Upon downloading the application, each user creates a username, a personal profile, and a contact list of friends who also use the application. The application uses the smartphone's GPS unit to track a user's location, running speed, and distance traveled. Users can use the application to review information and statistics about their previous runs. At the beginning of a run, users indicate the distance they want to run from their current location, and the application suggests a running route. Once a user accepts a suggested route, the application share the suggested route with other compatible users in the area so that they can run together. Users are considered compatible if they are on each other's contact lists or if they typically run at similar speeds. A basic RunRoutr account is free, but it displays advertisements that are…
arrow_forward
question 61/62
arrow_forward
2- if y=sin(t), where (-4≤t≤4) could you plot (t,y) as shown below:
Figure 1
File Edit View Insert Iools Desktop Window Help
4.0
Graph of the sine function
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
0.6
-0.8
-1
Y axis
4
3
2
-1
0
X axis
Sine function
1
2
arrow_forward
Question 56
arrow_forward
Course Title : Operating SystemQuestion :
How you will create new user using terminal in Ubuntu? Add screenshots of all steps for new user creation including terminal and Login page in Answer sheet. Every student has to create new user as of his/her arid number for example (18-arid-2929).
Note: screenshots are mandatory.
arrow_forward
add tags for these feature files with --tags option:
When you select scenarios by one tag
When you select scenarios that have one or another tag
When you select scenarios that have 2 tags
When you disable scenarios that have a specific tag
Given Scenarios:
Feature: Login functionalityBackground:Given a web browser is at the BrainBucket login pageScenario: user can't login without entering emailGiven User is not logged inWhen Password is enteredAnd User click Login buttonThen 'Warning: No match for E-Mail Address and/or Password' will be shownScenario: user can recover his passwordGiven User is not logged inWhen User clicks 'Forgotten Password' buttonAnd enters his emailThen Message 'An email with a confirmation link has been sent your email address.' will be dispalyed
arrow_forward
Favorite Color
Rank the following colors according to your preference with 1 being the most preferred and 5 the least preferred color.
Survey Result: (50 respondents)
Favorite Color Ranking
1st
2nd
3rd
4th
5th
Blue
8
7
9
15
11
Red
16
9
7
9
9
Yellow
11
14
11
5
9
Violet
4
11
17
10
8
Green
11
9
6
11
13
Instructions: Create a preference schedule for the rankings cast by your respondents.
arrow_forward
Javascript help please,
arrow_forward
Laboratory Exercise Party Planner Objective: At the end of the exercise, the students should be able to: Create a menu bar with multiple user options. Apply event. Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: 1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive. 2. Create a new project named LabExer8. Set the project location to your own folder. 3. Construct import statements to use the packages listed below: javax.swing java.awt java.awt.event 4. Extend the JFrame class and implement the ActionListener interface. 5. Create a JMenuBar named mainBar and two (2) Menu objects named menut and menu2. Set the text of menu 1 as File and the text of menu2 as Event Type. 6. Create the items that will appear in the menus. The File menu shall contain an Exit submenu. Name the object exit. The Event Types menu shall contain two (2) submenus: Adult and Child. Name the objects adult and hild, respectively. The bmenu consist…
arrow_forward
Linux bin bash script to create a new user on your Linux system and assign the user to a group. The script will first check if the user and group exists. If the user exists, provide a message saying the user exists. If the user doesn’t exist, create the group, if it doesn’t exist, and then create the user, finally assign the user to the group. Move the script to /home//scripts/ directory. Change the group to techstaff. Set appropriate permissions.
arrow_forward
Hands-On Exercises #7 Superglobals $_GET and $_POST Source: Source: Connolly, R. and Hoar, R., (2018), Fundamentals of Web Development
Before you do the exercises
If you haven’t already done so, you should create a folder in your personal drive for all the exercises. This set of exercises requires a functioning webserver to interpret the PHP code.
Exercise 7-1 Checking for POST
1. 2.
Test lab7‐exercise7-1.php in a browser and notice that it contains a simple one field form that posts the results back to itself.
The first thing to do is detect whether the page was reached through a get (a link followed) or whether the page was arrived by the form being posted.
Edit the displayPostStatus() function as follows and test.
function displayPostStatus() {
if ($_SERVER["REQUEST_METHOD"] == "POST") { echo "Post detected";
} else {
echo "No Post Detected";
}
}
Now when you post the form you see the post detected, and when you enter the URL and hit enter (GET) it does not see the POST.
Next, let…
arrow_forward
Average Steps TakenA Personal Fitness Tracker is a wearable device that tracks your physical activity, caloriesburned, heart rate, sleeping patterns, and so on. One common physical activity that mostof these devices track is the number of steps you take each day.If you have downloaded this book’s source code from the Premium Companion Website,you will find a file named steps.txt in the Chapter 06 folder. (The Premium CompanionWebsite can be found at www.pearsonglobaleditions.com/gaddis.) The steps.txt filecontains the number of steps a person has taken each day for a year. There are 365 linesin the file, and each line contains the number of steps taken during a day. (The first line isthe number of steps taken on January 1st, the second line is the number of steps taken onJanuary 2nd, and so forth.) Write a program that reads the file, then displays the averagenumber of steps taken for each month. (The data is from a year that was not a leap year,so February has 28 day
(in Phyton)
arrow_forward
Creating Directories (Folders), Subdirectories, and Files
Open the CMD window
Move to the upper most directory (the root): CD\
Create a new directory and name it as: YourLastName
Change directory to YourLastName : CD YourLastName
Inside YourLastName directory create the following Subdirectories:
CIS100
CIS115
CIS120
CIS165
CIS200…
arrow_forward
linux makefile topic
Running “make” command without the arguments starts the target ____ in the makefile.
arrow_forward
______ does not end a request.
response.write()
response.end()
response.render()
arrow_forward
Help Guides for Microsoft Word Paper title. You may attach an external file by providing a link to it.
arrow_forward
Login.feature file has following scenarios:
@negative
Scenario: User can't login without entering password
Given user is not logged in
When user enters email
And user clicks Login button
Then warning is shown No match for E-Mail Address and/or Password
@negative @skip
Scenario: User can't login without entering email
Given user is not logged in
When user enters password
And user clicks Login button
Then warning is shown No match for E-Mail Address and/or Password
Do the following:
Combine those 2 Scenarios in 1 Scenario Outline
Implement step for a new Scenario Outline
arrow_forward
Directions: Read each item carefully. Create command/codes based on the information requested on each item. (R programming)
Out of 27 respondents considered in the survey, the respondents specify that their favorite subjects are mathematics, statistics, and science with 12, 5, and 10 of the total respondents, respectively. Create a factor, based on the information given.
arrow_forward
M7Pro_Files
Upload your accounts python file here
What to do:
U are to create a report for users that will list their student id number, last name, and first name. Also, you will list their username and email address
The input file is linked below
studentInfo.txt
(opens in new window)
Note: You are to add YOUR first and last name in the first row ( instead fo Mr. Cameron's), the ID SHOULDN'T be your real ID, just a imaginary number there
The output file that your program will generate should look like the one linked below:
loginInfo.txt
(opens in a new window)
Given a text file , studentInfo.txt , linked above (or U can use one you created) that contains only last name( field size = 10) and first name(field size is 10) and student id numbers (field size is 7) you will create a report that will generate the usernames as well as student email accounts as shown in the loginInfo.txt linked above.
Notice that the login name consists of the first 7 characters of the last name, the…
arrow_forward
QUESTION PROVIDE IN ATTACHMENT. KINDLY SEE.
MATCH OUTPUT AS IT IS WITH QUESTION OUTPUT.
arrow_forward
Add functionality to retrieve a car record either by ID, Model, or price range.
Add menu options to retrieve a car record
by a car by Id or Model name
a user should be able to search by ID or by item name
create only one submenu option for searching
the search should not be case sensitive (for example, a user may enter sTRolleR or STROLLER);
store items in all lower/upper case to expedite the search
write one search function that can search by ID and name and goes through the array of structs/objects only once
allow partial search; must return all matching items (for example, a user can enter "roll" to search for a "stroller"; return "rolls", "stroller"); see C++ find() function
show the entire record if found or an appropriate message if not
by a price range
user should be able to enter the target price and the range; for exampletarget price: 5000range %: 20
20% of 5000 is 1000, display all valid car records with a price at least $4000 (5000-1000) and no more than $6000 (5000+20%)
arrow_forward
Just draw the UML diagram
MyWellness is an -health application that allows you to monitor your health status and details.
The application also allows you to get in touch with your doctors for quick consultations and
questions, in addition to getting appointments. The application has three main users:
Administrator, Patient, and Doctor.
Patients need to have an account to interact with the application. They can register by providing a
username and a password, then proceed to create their protiles by entering intormation such as full
name, email, phone number, address, and birthdate. In addition to the regular profile, patients have
a medical profile that contains the following information: height, weight, insurance (yes/no),
allergies, disabilities, and different previous medical conditions. Patients also have access to the
history of visits; they can see the general (for all doctors) history and the history per doctor. In this
history, they see the date of the visit and the…
arrow_forward
Written Use Case
Follow the sample format shown in the attached photo.Sample have its label, while the one you should make a written use case is the one who have blue ovals
arrow_forward
user stories
I need 5 user stories about Online Crime Management for my project
For example, user stories might look like that:As a police officer, i would like to be able to check for past records with an ID number(like a passport), so that I don’t have to use the name of the person
second example
“As a [persona], I [want to], [so that].”Breaking this down:"As a [persona]": Who are we building this for? We’re not just after a job title, we’re after the persona of the person. Max. Our team should have a shared understanding of who Max is. We’ve hopefully interviewed plenty of Max’s. We understand how that person works, how they think and what they feel. We have empathy for Max.“Wants to”: Here we’re describing their intent — not the features they use. What is it they’re actually trying to achieve? This statement should be implementation free — if you’re describing any part of the UI and not the user goal, you're missing the point.“So that”: how does their immediate desire to do…
arrow_forward
Creat a data file which stores all the email id's class students. Also read the all email id's of the student from the data file and display names on the screen..
arrow_forward
Upload answer sheets
Define step by step algorithm for the previous question. Explain the flow of the program in your own terms, especially, when control goes to function 2 from main method, not more than two pages.
Once you upload files from your second device, click on
Sync
to check your submission
arrow_forward
response page checks username and
password against arrays of valid usernames
and passwords (normally this is done
against a database - we'll change it later)
If valid - saves username to cookie, and sets
session variable LoggedIn to TRUE. If not,
sets the session variable to FALSE.
Displays link to "content page" (the page
you're protecting).
Created with Mi Notes
arrow_forward
Overview
Reading and writing to files is a constantly used way of transferring data in many different kinds of programs. Websites, such as news sites, and various phone applications are both excellent examples of this widespread use. Phone apps in particular will always read and write to files, since the alternative of writing to databases would be too large for their purposes. Another example is an application you use for daily tasks such as writing in a Microsoft Word file and uploading it as a Brightspace submission (to later be downloaded by your instructor). All of these demonstrate the importance and prevalence of reading and writing to a file as a method of information sharing.
Later in this course, you will need to be able to share information between C++ and Python as part of completing a larger task. Practicing reading and writing to a file this week will help prepare you for that later work. Although you will eventually have a broader understanding of working with files in…
arrow_forward
Sequence Diagram for the use case text below:
Basic Course
The student views the Grad Check Home Page and clicks on the Edit Schedule button. The system then displays the Current Student Schedule. On this page, the student may then choose a course to delete a course or to add a course. After the student performs these tasks, the system asks the user to save the changes on the Save Changes page. If the student selects Yes, the system updates the student record file. Otherwise, the student record is not updated.
Alternate Course
The student record file is unavailable: display Unable to Save page to the Student.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Windows 10 Comprehensive 2019
Computer Science
ISBN:9780357392607
Author:FREUND
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Related Questions
- Create automatic. Html page.arrow_forwardTranscribed Image Text RunRoutr is a fitness tracking application for smartphones that creates suggested running routes so that users can run with each other. Upon downloading the application, each user creates a username, a personal profile, and a contact list of friends who also use the application. The application uses the smartphone's GPS unit to track a user's location, running speed, and distance traveled. Users can use the application to review information and statistics about their previous runs. At the beginning of a run, users indicate the distance they want to run from their current location, and the application suggests a running route. Once a user accepts a suggested route, the application share the suggested route with other compatible users in the area so that they can run together. Users are considered compatible if they are on each other's contact lists or if they typically run at similar speeds. A basic RunRoutr account is free, but it displays advertisements that are…arrow_forwardquestion 61/62arrow_forward
- 2- if y=sin(t), where (-4≤t≤4) could you plot (t,y) as shown below: Figure 1 File Edit View Insert Iools Desktop Window Help 4.0 Graph of the sine function 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 0.6 -0.8 -1 Y axis 4 3 2 -1 0 X axis Sine function 1 2arrow_forwardQuestion 56arrow_forwardCourse Title : Operating SystemQuestion : How you will create new user using terminal in Ubuntu? Add screenshots of all steps for new user creation including terminal and Login page in Answer sheet. Every student has to create new user as of his/her arid number for example (18-arid-2929). Note: screenshots are mandatory.arrow_forward
- add tags for these feature files with --tags option: When you select scenarios by one tag When you select scenarios that have one or another tag When you select scenarios that have 2 tags When you disable scenarios that have a specific tag Given Scenarios: Feature: Login functionalityBackground:Given a web browser is at the BrainBucket login pageScenario: user can't login without entering emailGiven User is not logged inWhen Password is enteredAnd User click Login buttonThen 'Warning: No match for E-Mail Address and/or Password' will be shownScenario: user can recover his passwordGiven User is not logged inWhen User clicks 'Forgotten Password' buttonAnd enters his emailThen Message 'An email with a confirmation link has been sent your email address.' will be dispalyedarrow_forwardFavorite Color Rank the following colors according to your preference with 1 being the most preferred and 5 the least preferred color. Survey Result: (50 respondents) Favorite Color Ranking 1st 2nd 3rd 4th 5th Blue 8 7 9 15 11 Red 16 9 7 9 9 Yellow 11 14 11 5 9 Violet 4 11 17 10 8 Green 11 9 6 11 13 Instructions: Create a preference schedule for the rankings cast by your respondents.arrow_forwardJavascript help please,arrow_forward
- Laboratory Exercise Party Planner Objective: At the end of the exercise, the students should be able to: Create a menu bar with multiple user options. Apply event. Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: 1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive. 2. Create a new project named LabExer8. Set the project location to your own folder. 3. Construct import statements to use the packages listed below: javax.swing java.awt java.awt.event 4. Extend the JFrame class and implement the ActionListener interface. 5. Create a JMenuBar named mainBar and two (2) Menu objects named menut and menu2. Set the text of menu 1 as File and the text of menu2 as Event Type. 6. Create the items that will appear in the menus. The File menu shall contain an Exit submenu. Name the object exit. The Event Types menu shall contain two (2) submenus: Adult and Child. Name the objects adult and hild, respectively. The bmenu consist…arrow_forwardLinux bin bash script to create a new user on your Linux system and assign the user to a group. The script will first check if the user and group exists. If the user exists, provide a message saying the user exists. If the user doesn’t exist, create the group, if it doesn’t exist, and then create the user, finally assign the user to the group. Move the script to /home//scripts/ directory. Change the group to techstaff. Set appropriate permissions.arrow_forwardHands-On Exercises #7 Superglobals $_GET and $_POST Source: Source: Connolly, R. and Hoar, R., (2018), Fundamentals of Web Development Before you do the exercises If you haven’t already done so, you should create a folder in your personal drive for all the exercises. This set of exercises requires a functioning webserver to interpret the PHP code. Exercise 7-1 Checking for POST 1. 2. Test lab7‐exercise7-1.php in a browser and notice that it contains a simple one field form that posts the results back to itself. The first thing to do is detect whether the page was reached through a get (a link followed) or whether the page was arrived by the form being posted. Edit the displayPostStatus() function as follows and test. function displayPostStatus() { if ($_SERVER["REQUEST_METHOD"] == "POST") { echo "Post detected"; } else { echo "No Post Detected"; } } Now when you post the form you see the post detected, and when you enter the URL and hit enter (GET) it does not see the POST. Next, let…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Windows 10 Comprehensive 2019Computer ScienceISBN:9780357392607Author:FREUNDPublisher:CengageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Windows 10 Comprehensive 2019
Computer Science
ISBN:9780357392607
Author:FREUND
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L