Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Programming Assignment
Start with the following Python code.

alphabet = "abcdefghijklmnopqrstuvwxyz"

test_dups = ["zzz","dog","bookkeeper","subdermatoglyphic","subdermatoglyphics"]

test_miss = ["zzz","subdermatoglyphic","the quick brown fox jumps over the lazy dog"]

# From Section 11.2 of:

# Downey, A. (2015). Think Python: How to think like a computer scientist. Needham, Massachusetts: Green Tree Press.

def histogram(s):
d = dict()
for c in s:
if c not in d:
d[c] = 1
else:
d[c] += 1
return d

Copy the code above into your program but write all the other code for this assignment yourself. Do not copy any code from another source.
Next consider the invert_dict function from Section 11.5 of your textbook.

# From Section 11.5 of:
# Downey, A. (2015). Think Python: How to think like a computer scientist. Needham, Massachusetts: Green Tree Press.

def invert_dict(d):
inverse = dict()
for key in d:
val = d[key]
if val not in inverse:
inverse[val] = [key]
else:
inverse[val].append(key)
return inverse

Modify this function so that it can invert your dictionary. In particular, the function will need to turn each of the list items into separate keys in the inverted dictionary.

Run your modified invert_dict function on your dictionary. Print the original dictionary and the inverted one.

Include your Python program and the output in your Learning Journal submission.

Describe what is useful about your dictionary. Then describe whether the inverted dictionary is useful or meaningful, and why
Create a Python dictionary that returns a list of values for each key. The key can be whatever type you want.

Design the dictionary so that it could be useful for something meaningful to you. Create at least three different items in it. Invent the dictionary yourself. Do not copy the design or items from some other source.

.
Describe how tuples can be useful with loops over lists and dictionaries, and give Python code examples. Create your own code examples. Do not copy them from the textbook or any other source.

Your descriptions and examples should include the following: the zip function, the enumerate function, and the items method.

What should you do if you receive a text or email from someone you don't know?


A. Call the police B. Delete it


without opening it C. Open it immediately and reply D. Leave it in your inbox until you figure out who it is



What is the requirements?

What are the types of requirements?

What is the user requirement?

What is the system requirement?


Polly Pipe is a water sports provider and installer based in Braintree, England. They need you to design and implement a database that meets the data requirements. These necessities are defined in this scenario and below are samples of the paper records that the Polly Pipe preserves.

Polly Pipe is focused in placing aquariums at business customers. Customers can request several installations, but each installation is tailor-made for a specific customer. Facilities are classified by type. One or more employees are assigned to each facility. Because these facilities are often very large, they can include carpenters and masons as well as water installers. The facilities use equipment such as aquariums, air pumps and thermostats. There can be multiple computers in a facility.

Identify the user and system requirements to design a database for the above scenario.




How to code this Enter·the·first·character:·C

Enter·the·second·character:·U

C

.

.

.

U


Q.4.1 You have configured a switch on your network. Your organisation has asked you to

provide possible solutions or defences for the following attacks.

Write down one security defence for each of the following presented attacks and

indicate the type of attack that it is:


Attack A:

An attacker connects his device to the switch’s mirror port.


Attack B:

An attacker overflows the switch’s address table with fake MAC addresses, forcing

it to act like a hub, sending packets to all devices.


Attack C:

The attacker sends a forged ARP packet to the source device, substituting the

attacker’s computer MAC address.


Write a program in PL/SQL to FETCH multiple records and more than one columns from the same table.


LATEST TUTORIALS
APPROVED BY CLIENTS