My SQL and Python coding. Please attach the screenshot and program.
Assignment # 1
Wireless Network Security
Topic: Forward Error Correction (FEC)
Total Marks: 5
Q: Allice and Bob are communicating over the wireless channel using the following shared
codeword dictionary.
Encoded bits
Corresponding codewords
00
01
10
11
00000
11100
10011
01111
Let’s say that Allice sent the following message (01 00 10 11), but due to some reason, bob
received a different message. Now using FEC, and Hamming Distance calculate in which scenario
a retransmission will be required or not?
Sent encoded bits
Transmitted codewords
Received Codeword
01
00
10
11
11
11100
00000
10011
01111
01111
11100
10000
10001
01010
01111
To Answer only fill the following table, (you can do hamming distance calculation of a separate
paper and take image of that to attach the picture here with the assignment)
Received bits
11100
10000
10001
01010
01111
Re-Transmission Required?
Yes/No
Yes/No
Yes/No
Yes/No
Yes/No
SQL expression on MySQL & start coding in Python.
PART A
Do more on the database “registrar” discussed in class
1) Create a table called Department over attributes name and chair
Note that name is the primary key and it is referenced by “major” in the student table.
2) Populate a couple of instances into Department
3) Write a query to list how many classes are offered by which department.
[Issue] Do you see the issue in this scenario?
[Tip] The two tables, Department and Course should share a common attribute, say “offeredIn”
PART B:
Install Python 3.11.5 and run the following:
4) In addition to what has been coded in class, declare the following two variables, myFirst and
myLast that hold respectively my first name and my last name. Use your name!
5) Write one more print() statement to display. The sample display can be shown as below.
However, your output should be the second execution, but NOT the first.
>>> (executing cell “” (line 1 of “hw2.py”))
The university that I like is
Mercy University
The university that I like is Mercy University
My name is Yoon , John
>>> (executing cell “” (line 1 of “hw2.py”)) # improved display!!!
The university that I like is
Mercy University
The university that I like is Mercy University
My name is Yoon, John
Note that the highlighted outputs: the first output shows the comma with spaces before and
after. This can be improved to the second output. The comma should be attached to the end of
the last name. [Hint] use “+” to concatenate the last name and the comma.
Submission:
PART 1:
The screenshot showing the execution of the query: Select * from Department
The screenshot of execution of the query in 3)
PART 2: Your Python code file