COSC2506 Practical Test 1
.docx
keyboard_arrow_up
School
Royal Melbourne Institute of Technology *
*We aren’t endorsed by this school
Course
2384
Subject
Computer Science
Date
Apr 27, 2024
Type
docx
Pages
5
Uploaded by MagistrateGrouse3661 on coursehero.com
Answer Sheet – COSC2506 Practical Test 1 Student Name: Date: 10/08/2023
Task 1 (Q1-Q7 – 7 points)
Copy your answers/outputs
from the terminal here. Q1
student@ubuntu:~$ mkdir s3333333
Q2
student@ubuntu:~$ cd s3333333
student@ubuntu:~/s3333333$ mkdir trial
student@ubuntu:~/s3333333$ mkdir test
Q3
student@ubuntu:~/s3333333$ cd test
student@ubuntu:~/s3333333/test$ touch myfile
student@ubuntu:~/s3333333/test$ touch yourfile
Q4
student@ubuntu:~/s3333333$ cd
student@ubuntu:~$ cd /home/student/s3333333/test
student@ubuntu:~/s3333333/test$
Q5
student@ubuntu:~/s3333333$ cd /home/student/s3333333/test
student@ubuntu:~/s3333333/test$ rm myfile
student@ubuntu:~/s3333333/test$ ls
yourfile
Q6
student@ubuntu:~/s3333333/test$ cd /home/student/s3333333
student@ubuntu:~/s3333333$ rmdir test
student@ubuntu:~/s3333333$ ls
trial
Q7
student@ubuntu:~/s3333333$ echo "Date: 'date+%d/%m/%y'. Time: 'date+%I:%M'"
Date: 'date+%d/%m/%y'. Time: 'date+%I:%M'
Task 2 (Q8-Q9 – 2 points)
Copy your answers/outputs
from the terminal here. student@ubuntu:~/s3333333$ touch file_again
student@ubuntu:~/s3333333$ mkdir dir_again
student@ubuntu:~/s3333333$
Q8
student@ubuntu:~/s3333333$ chmod u=rwx,g=rx,o=r file_again
student@ubuntu:~/s3333333$
Q9
student@ubuntu:~/s3333333$ chmod 754 dir_again
student@ubuntu:~/s3333333$
Task 3 (Q10-Q11 – 2 points)
Copy your answers/outputs
from the terminal here. Q10
student@ubuntu:~/s3333333$ echo "Today is $(date '+%A'). It is $(date '+%j')th day of the year."
Today is Thursday. It is 222th day of the year.
Q11
student@ubuntu:~/s3333333$ sed -n '35p' /etc/passwd
usbmux:x:113:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin
Task 4 (Q12-Q14 – 6 points)
Copy your answers/outputs
from the terminal here. Q12
student@ubuntu:~$ ls -a > filesnumber
student@ubuntu:~$ cat filesnumber
.
..
.bash_history
.bash_logout
.bashrc
.cache
.config
.gnupg
.local
.profile
.ssh
.sudo_as_admin_successful
.vboxclient-clipboard.pid
.vboxclient-display-svga-x11.pid
.vboxclient-draganddrop.pid
.vboxclient-seamless.pid
.viminfo
Desktop
Documents
Downloads
Music
Pictures
Public
Templates
Videos
filesnumber
s3333333
task1
task1.new
task1_difference
tut3
two
Q13
student@ubuntu:~$ ls -1A | sort | tr 'a-z' 'A-Z'
.BASH_HISTORY
.BASH_LOGOUT
.BASHRC
.CACHE
.CONFIG
.GNUPG
.LOCAL
.PROFILE
.SSH
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
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
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
@#Correct and detailed answer will be Upvoted else downvoted.
arrow_forward
Task 4:
The InstantRide User Satisfaction team is a core team for InstantRide, and they focus on increasing the customer satisfaction. They want to learn the travel time for each ride in the system. You need to return the USER_ID, and the TRAVEL_TIME column which is calculated using the TIMEDIFF function on the TRAVEL_END_TIME and the TRAVEL_START_TIME.
arrow_forward
The following table shows a list of pets and their owners that is used by a veterinarian service.
P_Name
Type
Breed
DOB
Owner
O_Phone
O_E-mail
Kino
Dog
Std. Poodle
3/27/97
M. Downs
5551236
md@abc.com
Teddy
Cat
Chartraux
4/2/98
M. Downs
1232343
md@abc.com
Filo
Dog
Std. Poodle
2/24/02
R. James
2343454
rj@abc.com
AJ
Dog
Collie Mix
11/12/95
Liz Frier
3456567
liz@abc.com
Cedro
Cat
Unknown
12/10/96
R.James
7865432
rj@abc.com
Woolley
Cat
Unknown
10/2/00
M. Trent
9870678
mt@abc.com
Buster
Dog
Collie
4/4/01
Ronny
4565433
ron@abc.com
a. Describe 4 problems that are likely to occur when using this table.
b. Break the table into two tables in a way that fixes the four problems.
arrow_forward
Code please. 8
arrow_forward
v Question Completion Status:
A Moving to another question will save this response.
Question 25
Which of the following propositions is tautology?
O (p v q)-q
O pv (q-p)
O pv (p-q)
O p-q
A Moving to another question will save this response.
arrow_forward
Twitter Data:
twitter_url = 'https://raw.githubusercontent.com/Explore-AI/Public-Data/master/Data/twitter_nov_2019.csv'twitter_df = pd.read_csv(twitter_url)twitter_df.head()
Question: Write the Number of Tweets per Day
Write a function which calculates the number of tweets that were posted per day.
Function Specifications:
It should take a pandas dataframe as input.
It should return a new dataframe, grouped by day, with the number of tweets for that day.
The index of the new dataframe should be named Date, and the column of the new dataframe should be 'Tweets', corresponding to the date and number of tweets, respectively.
The date should be formated as yyyy-mm-dd, and should be a datetime object. Hint: look up pd.to_datetime to see how to do this.
arrow_forward
q5,6
Question 5
A Boolean function represented by an input/output table that has 3 rows where the output is 1 is equivalent to a Boolean expression that is a sum of 3 minterms.
True
False
Question 6
A Boolean function with 4 variables requires an input/output table with 8 rows.
Group of answer choices
True
False
arrow_forward
Guest House Paradiso
The Guest House Paradiso used to be a splendid place to stay. But things haven't been updated in a while. Including the way that room bookings are recorded. At the moment
they're recorded in a spreadsheet like this:
Bookings Table
Room
Number
Number of
Nights
Arrival Date
Departure Date
Guest Last Name
Guest Phone Number
Optional Extras
203
Mar 18 2022
Mar 20 2022
Howard
555-2381
bug-free bed
101
Mar 18 2022
Mar 21 2022
3
Gallagher
555-3619
clean towels, hot water
302
Mar 18 2022
Mar 19 2022
1
Mortimer
555-0856
bug-free bed, clean towels
103
Mar 18 2022
Mar 23 2022
5
McQueen
557-2428
hot water
...
203
Mar 20 2022
Mar 23 2022
3
Carraclough
554-8652
clean towels, hot water
Optional Extras
There are three types of 'Optional Extras' available in all rooms, and guests can order any combination of these:
• hot water
• bug-free bed
• clean towels
NOTE: For this scenario we will assume that a guest's phone number never changes and is unique.
arrow_forward
Best wishes and will upvote
arrow_forward
yout References Mailings
Review View Help
Grammarly
7. Convert the following numbers from a specific base to another base.
a. 1236 to base 5 (i.e. Convert from base 6 to base 5)
b. 7648 to base 4 __(i.e. Convert from base 8 to base 4)
c. 2345 to base 4
(i.e. Convert from base 6 to base 4)
arrow_forward
Kroger Co., a large nationwide grocery chain, maintains a customer reward system titled the “Kroger Plus” card. Customers who enroll in this system are entitled to discounts on products at Kroger stores and on gasoline. To earn discounts and other rewards, the shopper must use the “Kroger Plus” card at the time of checkout. The card has a bar code that identifies the customer. This system allows Kroger to determine customer buying patterns and to use the data for data mining.
Using a Web search engine, search for “data mining” and “grocery.” In a one (1) page response, describe what types of information grocery stores collect that they can use for data mining purposes. Also, describe how grocery chains use data mining to improve performance.
arrow_forward
Correct answer will appreciated.
arrow_forward
Using the Mars MIPS Simulator, create a MIPS program that implement the game Rock paper scissors. Each game will have 3 rounds. Every round ask each user to provide as an input through the keyboard their choice. Then compare choices and define the winner of the round. After the completion of 3 rounds display the final results.
Constraint: comment each line.
arrow_forward
Programming Exercise 2-9
Instructions ctions
!!! 3
до
Instructions
?
Write a program that prompts the user
to enter five test scores and then prints
the average test score. Indicate the
average test score by printing it to the
terminal using the following format:
Your average test score is: X
(Assume that the test scores are
decimal numbers.)
Grading
When you have completed your
program, click the Submit button to
record your score.
18
19
20
10
11
12
13
14
15
16
17
21
22
23
24 }
25
main.
9
1 #i
2 3 4 up co N 00
3 usi
5 int
6 {
do
dc
CO
ci
COU
cir
COU
cin
cout
cinx
cout
cin>
avg=
cout<
+
arrow_forward
Ten members of Math Club are driving to a math conference in a neighboring state. However, some of
these students have dated in the past, and things are still a little awkward. Each student lists which
other students they refuse to share a car with; these conflicts are recorded in the table below. What is
the fewest number of cars the club needs to make the trip? Do not worry about running out of seats,
just avoid the conflicts.
Student: A B C D
Conflicts: BEJ ADG HJ
BF
E
AI
F
DJ
G H
B CI
I
EHJ
J
ACFI
arrow_forward
downvote immediately else ill report
arrow_forward
P1 - Loan Payment Schedule
Main Street Bank is offering an annual interest rate discount based on the client’s credit score. The discount for each credit score level is provided in the table below. The lowest credit score is 300 while the highest credit score is 850. For example, the new interest rate for a client with a credit score of 755 and a current interest rate of 4.25% would be 4.25 – 0.75 = 3.50% interest rate
Credit Score
Rating
Interest Rate Discount
300 - 579
Very Poor
0.00
580 – 669
Fair
0.25
670 - 739
Good
0.50
740 - 799
Very Good
0.75
800 - 850
Exceptional
1.00
Use modular programming concepts
Create a program that includes a WHILE loop to generate a payment schedule for loans that are paid in equal monthly payments
Input the loan number and retrieve required loan account from MS_LOANS table
Output is shown below
Monthly interest is calculated by dividing the yearly interest rate by 12 to get a monthly interest…
arrow_forward
Pls help ASAP. Pls do all asked questions. Pls show all work and calculations.
arrow_forward
1. Come and Get Sum
by CodeChum Admin
You think you're smart huh? I bet you cant add even add
two numbers together! Prove me wrong and I might just
back off.
Input
1. The first integer
Constraints
This is a whole number.
2. The second integer
Constraints
This is a whole number.
Output
The first line will contain a message prompt to input the
first integer.
The second line will contain a message prompt to input
the second integer.
The last line will contain the whole equation with the
sum.
Enter the first - number: 1
Enter the second- number: 2
1.+23
arrow_forward
The expression =IF(A1 > 8, 12*A1, 7*A1) is used in a spreadsheet.Find the result if A1 is 5 Find the result if A1 is 9.
arrow_forward
5- The assignment model is a special case of the transportation model in which the number of origin must equal the number of the destination that is the table is a square that is the number of rows and columns must be equal.
Select one:
True
False
6- The points on the network model are referred to as arcs.
Select one:
True
False
arrow_forward
Order Number: 5678
Customer Number: 9123
Customer Name: Thomas
Customer Address: 51 Samora Machel Street
City- Country: Durban, South Africa
ProductNo
A 123
B 234
C 345
Description
A4 Paper
Order Form
Toner
Staples
Normal Form
Quantity
100
200
1000
Date: 25/12/2020
Unit Price
R1.00
R150.00
R5.00
1.1 Using normalization principles, depict the ONF, 1NF, 2nd NF and 3rd NF of the data
above.
Example:
Below is an example of the table information converted to zero normal form, read
chapter five in your module guide and convert the table to first, second and third normal
form.
The format of your answer must be as depicted below:
• ORDER( order number, customer number, name, address, order date(product number,
description, quantity, unit price))
arrow_forward
KA
Helge Autoparts sells new and refurbished auto parts exclusively to auto dealers. Helge purchases inventory from distributors at trade conventions. Each time Helge makes a purchase, the company records the suppliers name, address, date, specific items purchased, price paid for each, and the total amount spent. Helge later researches the inventory items to set the customer price. The company assigns an inventory number to each item purchased and records the customer price for each item. Helge buys price tags and display supplies from Alwin Incorporated, a company that sells them at all trade conventions. All inventory and supplies purchases are immediately paid for with cash or with checks from a bank account in Helge's name. All cash received from sales are also deposited to the same bank account. Several times a year Helge rents display space at dealer conventions. A deposit is always required, and the entire fee is due the day the convention starts. Helge records the deposit and…
arrow_forward
DIRECTION: Analyze the following code snippet below. Give the final output.
PHP CODE SNIPPET # 1:
arrow_forward
Overview
This program will prompt a user for a first_num and a second_num and then tell you how many times first_num goes into second_num), and the remainder.
Expected Output
Example 1
Enter the first number: 6
Enter the second number: 5
5 goes into 6 1 times with a remainder of 1
Example 2
Enter the first number: 21
Enter the second number:
5 goes into 21 4 times with a remainder of 1
Specifications
• You should submit a single file called M5A1.py
• It should follow the submission standards outlined here: Submission Standards
• Your program populate an integer named first_num using input
• Your program populate an integer named (second_num using input
• Your program should have a single print statement that uses an f-string
Tips and Tricks
It's as simple as it seems; try different math functions and see what output they produce. Experiment as you go.
arrow_forward
TASK Q0Q Q0P1. SHOULD COOL.
arrow_forward
Richardson Ski Racing (RSR) sells equipment needed for downhill ski racing. One of RSR's products is fencing used on downhill courses. The fence product comes in 150-foot rolls and sells for $215 per roll. However, RSR offers quantity
discounts. The following table shows the price per roll depending on order size:
Quantity Ordered
To
Price per Roll
From
1
70
$215
71
140
$195
141
280
$175
281
and up
$155
Click on the datafile logo to reference the data.
DATA file
(a) Use the VLOOKUP function with the preceding pricing table to determine the total revenue from these orders.
(b) Use the COUNTIF function to determine the number of orders in each price bin.
From
Number of
To
Price per Roll
70
$215
!!!
140
$195
280
$175
and up
$155
1
71
141
281
Orders
172
arrow_forward
Posted 3rd time answer correctly else will give you downvote
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Related Questions
- 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_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_forward@#Correct and detailed answer will be Upvoted else downvoted.arrow_forward
- Task 4: The InstantRide User Satisfaction team is a core team for InstantRide, and they focus on increasing the customer satisfaction. They want to learn the travel time for each ride in the system. You need to return the USER_ID, and the TRAVEL_TIME column which is calculated using the TIMEDIFF function on the TRAVEL_END_TIME and the TRAVEL_START_TIME.arrow_forwardThe following table shows a list of pets and their owners that is used by a veterinarian service. P_Name Type Breed DOB Owner O_Phone O_E-mail Kino Dog Std. Poodle 3/27/97 M. Downs 5551236 md@abc.com Teddy Cat Chartraux 4/2/98 M. Downs 1232343 md@abc.com Filo Dog Std. Poodle 2/24/02 R. James 2343454 rj@abc.com AJ Dog Collie Mix 11/12/95 Liz Frier 3456567 liz@abc.com Cedro Cat Unknown 12/10/96 R.James 7865432 rj@abc.com Woolley Cat Unknown 10/2/00 M. Trent 9870678 mt@abc.com Buster Dog Collie 4/4/01 Ronny 4565433 ron@abc.com a. Describe 4 problems that are likely to occur when using this table. b. Break the table into two tables in a way that fixes the four problems.arrow_forwardCode please. 8arrow_forward
- v Question Completion Status: A Moving to another question will save this response. Question 25 Which of the following propositions is tautology? O (p v q)-q O pv (q-p) O pv (p-q) O p-q A Moving to another question will save this response.arrow_forwardTwitter Data: twitter_url = 'https://raw.githubusercontent.com/Explore-AI/Public-Data/master/Data/twitter_nov_2019.csv'twitter_df = pd.read_csv(twitter_url)twitter_df.head() Question: Write the Number of Tweets per Day Write a function which calculates the number of tweets that were posted per day. Function Specifications: It should take a pandas dataframe as input. It should return a new dataframe, grouped by day, with the number of tweets for that day. The index of the new dataframe should be named Date, and the column of the new dataframe should be 'Tweets', corresponding to the date and number of tweets, respectively. The date should be formated as yyyy-mm-dd, and should be a datetime object. Hint: look up pd.to_datetime to see how to do this.arrow_forwardq5,6 Question 5 A Boolean function represented by an input/output table that has 3 rows where the output is 1 is equivalent to a Boolean expression that is a sum of 3 minterms. True False Question 6 A Boolean function with 4 variables requires an input/output table with 8 rows. Group of answer choices True Falsearrow_forward
- Guest House Paradiso The Guest House Paradiso used to be a splendid place to stay. But things haven't been updated in a while. Including the way that room bookings are recorded. At the moment they're recorded in a spreadsheet like this: Bookings Table Room Number Number of Nights Arrival Date Departure Date Guest Last Name Guest Phone Number Optional Extras 203 Mar 18 2022 Mar 20 2022 Howard 555-2381 bug-free bed 101 Mar 18 2022 Mar 21 2022 3 Gallagher 555-3619 clean towels, hot water 302 Mar 18 2022 Mar 19 2022 1 Mortimer 555-0856 bug-free bed, clean towels 103 Mar 18 2022 Mar 23 2022 5 McQueen 557-2428 hot water ... 203 Mar 20 2022 Mar 23 2022 3 Carraclough 554-8652 clean towels, hot water Optional Extras There are three types of 'Optional Extras' available in all rooms, and guests can order any combination of these: • hot water • bug-free bed • clean towels NOTE: For this scenario we will assume that a guest's phone number never changes and is unique.arrow_forwardBest wishes and will upvotearrow_forwardyout References Mailings Review View Help Grammarly 7. Convert the following numbers from a specific base to another base. a. 1236 to base 5 (i.e. Convert from base 6 to base 5) b. 7648 to base 4 __(i.e. Convert from base 8 to base 4) c. 2345 to base 4 (i.e. Convert from base 6 to base 4)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage