Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Do not change the function headers, just add your implementation for each function where indicated.

by | Nov 21, 2022 | Web programming | 0 comments

GET HELP WITH YOUR ESSAY

If you need assistance with writing your essay, our professional Essay Writing Service is here to help!

DISCOUNT CODE FIRST25

ORDER THIS OR A SIMILAR PAPER NOW

First, download the template file, project6.py Download project6.pyand the sample email file, AllEmails.txt Download AllEmails.txt. This file contains the function names and documentation. Do not change the function headers, just add your implementation for each function where indicated. Remember to indent all the code for the function. Submit your completed file to Gradescope. Here are the functions that you will write:
The function normalizeEmail has a valid email address as a parameter and returns the normalized email address.
Function heading: def normalizeEmail(emailIn):
Parameter Specification: A string that represents a valid email address
Return Value Specification: A string that represents the normalized email address
Sample Function Call: normalizeEmail(‘debraduke+cmsc210@gmail.com’)
Sample Return Value: ‘debraduke@gmail.com’
Sample Function Call: normalizeEmail(‘dEbRa.DuKe@gmail.com’)
Sample Return Value: ‘debraduke@gmail.com’
The function createDictionary has a file name as a parameter and returns a dictionary with normalized email addresses as keys and the number of times that address is in the file as values.
Function heading: def createDictionary(fileName):
Parameter Specification: A string that represents a file name
Return Value Specification: A dictionary containing the email addresses and the number of occurances of each unique one in the file
Sample Function Call: createDictionary(“allEmails.txt”)
Sample Function Call: createDictionary(“eml.txt”) # no file
Sample Return Value: File cannot be opened: eml.txt
The function getEligibleEmails has a dictionary as a parameter and returns a list of the normalized email addresses that have a value of 1 in the dictionary.
Function heading: def getEligibleEmails(emailDictionary):
Parameter Specification: A dictionary of email occurrances
Return Value Specification: A list containing the email addresses with values of 1 in the argument
Sample Function Call: getEligibleEmails(allEntries)
The function selectWinner that has a list of email addresses as a parameter and returns a string with normalized email addresses of one randomly selected from the list.
Function heading: def selectWinner(emailList):
Parameter Specification: list of email addresses
Return Value Specification: one email address randomly selected from the list
Sample Function Call: selectWinner(emailList)

GET HELP WITH YOUR ESSAY

If you need assistance with writing your essay, our professional Essay Writing Service is here to help!

DISCOUNT CODE FIRST25

ORDER THIS OR A SIMILAR PAPER NOW

How It Works

b

Tell us about your homework assignment.

~

Securely pay for your academic paper

j

Paper gets assigned to an expert tutor

Receive the complete paper via email

Team up With Your Own Writing Expert Now

Stuck with overwhelming assignments? We will take care of all your writing tasks.