CS101 Assignment 2 Solution Fall 2021 - Perfect VU Answer Solution

CS101 Assignment 2 Solution Fall 2021

Provide CS101 Assignment 2 Solution Fall 2021. Easy to See Proper Step by Step CS101 Assignment 2 Solution 2021 Fall Download PDF File.


CS101 ASSIGNMENT 2 SOLUTION FALL 2021 


Due Date: 28 Dec 2021

Total Marks: 20


Uploading Instruction

Submit your solution file in .doc or docx format only.


Question 1:

Write the HTML code to make a webpage as depicted in the following diagram (Sample output).


If you want newly fresh ready perfect assignment and need any help in assignment freely WhatsApp 03162965677


Note:

1. Use your VUID as the title of the web page and the contact information should contain your VU email id that is given at the end of the sample page. 

2. The VU logo should have a link to open the VU website “https://www.vu.edu.pk/”. You can include the VU logo in your webpage from the following URL:
https://www.vu.edu.pk/App_Themes/Default/Images/menu-img/logo.png

3. You have to write your marks, percentage and grade obtained in the intermediate degree.

4. Also add a list of your enrolled courses in the current semester as depicted in the diagram.


Write the HTML code in the Notepad editor. Name the Notepad file your VU-ID and save the file with .html extension. Open the .html file and take a screenshot of your output. 

Paste your HTML code and output screenshot in the solution file that should be a Microsoft Word document (.doc or .docx).


Solution:

Code:

<html>

<head>

<title>bc190567901</title>

</head>

<body>

<img src="https://www.vu.edu.pk/App_Themes/Default/Images/menu-img/logo.png" width="170" height="90">

<H1>Grade Details</H1>


<H3>Intermediate</H3>


<p>Obtained Marks: 593</p>


<p><i>Percentage: 54%</i></p>

<p><i> Grade: C </i></p>


<H1> Current Enrolled Courses </H1>

<u1>

<li>CS101</li>

<li>ENG101</li>

<li>CS201</li>

<li>ISL201</li>

<li>MTH101</li>

<li>VU001</li>

</u1>

<p><b>Contact Info:[email protected]</b></p>


</body>

</html>


Output:


Question 2:

Suppose a refreshment center is offering the following 8 flavors of juices and shakes. 


Sr. No.

Juice

0

Pena Colada

1

Strawberry

2

Pineapple

3

Mango

4

Orange

5

Cookies and cream Milk shake

6

Coffee Milkshake

7

Candy Flavor Milkshake

The availability of these 8 flavors can be represented in the form of an 8-bit status string e.g. “11111111” where each bit “1” from left to right represents the availability of each flavor in the table from top to bottom respectively. The left-most bit represents the availability status of Pena Colada and the right-most bit represents the availability of Candy Flavor Milkshake.  In the status string, “1” means the flavor is available and the unavailability of a flavor will be represented by “0” at the respective bit position. 


Considering the above scenario, perform the following operations:

Part A:

Assuming that all the flavors were available in the morning. If the juices at serial no. 3 and 5 in the table are finished at 2:00 PM, compute the new status string by using the appropriate logical operation.


Solution:


Part A:


Sr. No.

0

1

2

3

4

5

6

7

Juice

Pena Colada

Strawberry

Pineapple

Mango

Orange

Cookies and cream Milk shake

Coffee Milkshake

Coffee Milkshake

Morning Status

1

1

1

1

1

1

1

1

Juices at 2:00PM

1

1

1

0

1

0

1

1

New status after 2:00PM using AND Operator 

New Status after 2:00PM

1

1

1

0

1

0

1

1


Status at 2:00 PM mango and cookies and cream milkshake not available respectively 3 and 5 bits 


Part B:

If the availability status string of juices and shakes is “10101001” at 4:00 PM, check the availability of the “Coffee Milk Shake” using the appropriate logical operation:


Solution:


Part B:


Sr. No.

0

1

2

3

4

5

6

7

Juice

Pena Colada

Strawberry

Pineapple

Mango

Orange

Cookies and cream Milk shake

Coffee Milkshake

Coffee Milkshake

Juices at 4:00PM 

1

0

1

0

1

0

0

1

Morning Status

1

1

1

1

1

1

1

1

Final AND

1

0

1

0

1

0

0

1


In Logical AND is use and a coffee milkshake are not available.

Because bit number 6 is zero it means this shake is not available after logical and operation.


CS101 Assignment 2 Solution Fall 2021 Download


Check Also:


CS101 Important Past Papers Midterm

CS101 Short Notes


CS101 Solved Midterm Past Papers by Moaaz


PLEASE NOTE:

Don't copy-paste the same answer.

Make sure you can make some changes to your solution file before submitting copy-paste solution will be marked zero.

Before submitting an assignment check your assignment requirement file.


Post a Comment

0 Comments