0% found this document useful (0 votes)
37 views3 pages

ICT Mid Exam PaperA

Uploaded by

k240533
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

ICT Mid Exam PaperA

Uploaded by

k240533
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

National University of Computer & Emerging Sciences, Karachi

Fall-2023 FAST School of Computing


Midterm-I Paper-A
11th October 2023, 08:10 am – 11:00am

Course Code: Course Name:


Instructor Name: Mr. Ahmed Usman
Student Roll No: Section:
Instructions:
• Return the question paper and make sure to keep it inside your answer sheet.
• Read each question completely before answering it. There are three questions and two pages
(front plus back).
• In case of any ambiguity, you may make assumption. However, your assumption should not
contradict any statement in the question paper.
• Do not write anything on the question paper (except your ID and group).
• Submit the Excel File, the theory answers to be submitted in using MS Word (Properly Formatted),
Perform conversions on the piece of paper and staple it with the Question sheet.

Total Time: 2 Hour and 45 Mins Max Points: 40


------------------------------------------------------------------------------------------------------------------------------------------------
Question#1: EXCEL (LAB) (ETA 45mins) (10 Marks)

Scenario:

Imagine you have a table containing sales data for a small online store. The table includes columns such as
“Order ID”, “Product”, “Quantity”, ”Sold”, “Price per Unit”, and “Date”. You have to perform various
calculations and data validation tasks based on this data.

Table:

Order ID Product Quantity Sold Price per Unit Date


101 Product A 10 $25.00 2023-01-15 101
102 Product B 5 $30.00 2023-02-20 102
103 Product A 8 $25.00 2023-03-10 103
104 Product C 12 $15.00 2023-04-05 104
105 Product B 7 $30.00 2023-05-12 105
Questions:

- Open your Excel using Command Prompt (Bonus Marks)


- Calculate the total number of orders in the table.
- Calculate the total revenue generated from all orders.
- Count the number of orders where the product is "Product A."
- Calculate the total revenue generated from orders where the product is "Product B."
- Create a new column named "Revenue" that calculates the revenue for each order (Quantity Sold *
Price per Unit).
- Use the IF function to identify orders with revenue greater than $200 as "High Revenue" and orders
with revenue less than or equal to $200 as "Low Revenue."
- Create a new column named "Discount" that applies a discount of 10% to orders where:
o The quantity sold is greater than or equal to 10
o The product is either "Product A" OR "Product B"
o The date is not in the year 2023.
- Apply data validation to the "Product" column to ensure that only "Product A," "Product B," or
"Product C" can be entered.

1 OF 2
Question#2: Ubuntu (Theory) Read the Following paragraph and Fill in the commands to
help the sorcerer (ETA 30mins) (10 Marks)
Once upon a time in the magical land of Ubuntu, there lived a young and curious wizard named Merlin.
Merlin had always been fascinated by the power of command-line magic, and he had recently acquired a
new spellbook filled with Ubuntu commands.

One sunny morning, Merlin decided to embark on a magical journey through the world of Ubuntu
commands. He began his adventure by opening a terminal, a portal to a world of command-line magic.
With great excitement, he cast his first command _________________________________. This incantation
summoned the mighty Vim, a powerful text editor. Merlin was now ready to create his own magical
writings. He created a new file with the command _________________________________.

In the mystical realm of Vim, he wrote down his most cherished spells and secrets.

As Merlin continued his journey, he ventured into a mysterious directory______________________. Inside


this directory, he cast the command of revelation of his all directories ____________________________. A
list of enchanted scrolls and potion recipes filled the screen. Merlin decided to clean up his magical
workspace and removed an empty directory with the command ___________________________. With a
wave of his wand, he summoned a new scroll(text) ___________________. To test the power of his new
spell, Merlin cast a vanishing spell on its text style______________________. The scroll disappeared into
thin air. But Merlin's journey was far from over. He wanted to read the contents of a hidden scroll(textfile)
____________________________. The magical text revealed hidden knowledge, and Merlin was delighted.
However, he felt that his adventure was still missing something. He decided to invite a fellow wizard to join
him on his quest so she added another user ________________________________. With the new wizard
by his side, Merlin felt stronger and more secure. Together, they fortified their spells by changing
passwords, ensuring their secrets remained safe ________________________________. As the sun began
to set, Merlin realized that he had uncovered the power of Ubuntu commands. With his spellbook and
newfound knowledge, he knew that he could overcome any challenge in the mystical land of Ubuntu. With
a smile on his face, he closed the terminal, ready for new adventures and magical discoveries.

Question3#: SQL(Theory) (ETA 45mins) (10 Marks)


- Write Queries to create 3 tables.
o Customer ( C_ID, First Name, Last Name, City, Country)
o Orders ( O_ID, C_ID, Order Date, Total Amount, Delivery status)
o Products ( P_ID, O_ID, Product Name, Category, Price, Product status)
- Insert Sample data into each Table. (Make sure that First C_ID has your nuID, and the other C_ID as
+1 increment of your nuID)
- Update the Price of any one of the product you guys entered
- Write a Query which gives the Delivery status if each order of each customer
- Write Query which lists all the products of orders being placed.
- Delete The records
o of the Orders Table, having Delivery status as Shipped.
o of the products table, having product status as discontinued.

2 OF 2
Question#4: Conversions (Theory) (ETA 45mins) (10 Marks)
- What is the decimal equivalent of the binary number 1101?
- Determine the hexadecimal representation of the binary number 11001110.
- Find the binary representation of the decimal number 255
- Determine the decimal value of the hexadecimal number 3FF
- Add the binary numbers 10011 and 11001
- Subtract the binary numbers 11011 and 1010.
- Find the two's complement of the binary number 10101

BEST OF LUCK!

3 OF 2

You might also like