This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Given requests to add users to a group, output a list of the members of each group. | |
''' | |
def listMembers(string_list): | |
''' | |
We could automate the creation of a new group that is not in the | |
alphabetically ordered list of groups yet. However, I believe that is beyond | |
the scope of what this assignment is asking for. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Given a stream of href links, backward operations, or forward operations, output | |
a stream of the full url the browser should visit after each event in the input stream. | |
''' | |
def full_url(paths): | |
''' | |
In this implementation, I am assuming that a user cannot go backwards more | |
than once consequentively. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Given a stream of process ids associated with process start and finish actions, | |
output the one process id which has not yet finished, or 0 if all processes are | |
accounted for. | |
''' | |
def finished_processes(ids): | |
''' | |
It would have been too easy to use the count() method in python - the solution | |
would have been in a few lines of code only: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Jon | |
Zillow University Test | |
''' | |
def css_string_to_color(colorString): | |
if (colorString[0]!='#'): | |
print("Error") | |
else: | |
if correctLength(colorString): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Jon Abdulloev | |
''' | |
def paginate(num, results): | |
outputResults = sortDecreasing(results) | |
outputResults, paddingList = makeUnique(outputResults) | |
remaining = len(outputResults)%num |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import histogram_main | |
import time | |
def remove_punctuation(words): | |
# Initialize an empty Python dict | |
histogram = {} | |
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] |