Create a program that translates English into Pig Latin.
The function will take the first letter of each word in the sentence only if it’s a not a vowel, and place it at the end of the word followed by “ay”.
Your program must be case ins ensitive. You must write the functiontranslate() that takes in a single English word and returns its Pig Latin translation. Remembertranslatemusttakeonlyonewordasinput.
############################################################# # translate() takes a single english word translates it to
#pig latin # Input:english_word; an English word # Output:the pig latin translation
Here is some sample output, with the user input in blue.
(Yours does not have to match this word for word, but it should be
similar.)
linux[0]$ python hw5_part4.py
Enter an English phrase: You look nice today
I think you meant to say: Youay ooklay icenay odaytay
Enter an English phrase: Again we don't have to worry about
punctuation.
I think you meant to say: Againay eway on'tday avehay otay orryway
aboutay unctuation.pay
Enter an English phrase: I realized that this problem isn't as
easy as I had thought.
I think you meant to say: Iay ealizedray hattay histay roblempay
isn'tay asay easyay asay Iay adhay hought.tay
Enter an English phrase: Owls have 14 vertebrae in their necks.
So fancy!
I think you meant to say: Owlsay avehay 41ay ertebraevay inay
heirtay ecks.nay oSay ancy!fay
In: Computer Science
Who knew there were so many great words that start with the letter D? These are words that will benefit you both in college and after your graduate because they will amplify your written and spoken English. Some may be familiar to you; others may not. In either case, in your Word Journal, you will list the words and their definitions. Even if you think you know the definition of a word, I encourage you to look it up in a dictionary (or on a dictionary website) to be sure.
Some words may have multiple definitions. It is fine for you to include the first two or three definitions listed in the dictionary entry. Those will be the most common definitions for the word.
Here is your list of D words:
decorum
deference
delusion
denigrate
desiccate
despotic
diatribe
dichotomy
diction
didactic
discern
disingenuous
disparate
dissipate
divergent
dubious
This next group of words begin with the letters E and F. These are helpful words to learn because they will benefit you both now and after you graduate. Try to find ways to use these words as you write and speak to others. Even if you think you know what the word means, I encourage you to look it up.
Your Word Journal should include each word and its definition.
Here are your E and F words (and one isn't a word, it's an abbreviation):
In: Operations Management
Typing errors in a text are either nonword errors (as when "the" is typed as "teh") or word errors that result in a real but incorrect word. Spell‑checking software will catch nonword errors but not word errors. Human proofreaders catch 70%70% of word errors.
You ask a fellow student to proofread an essay in which you have deliberately made 1010 word errors.
(a) If ?X is the number of word errors missed, what is the distribution of ?X ? Select an answer choice.
?X is approximately Normal with ?=3μ=3 and ?=1.45σ=1.45
?X is binomial with ?=10n=10 and ?=0.3p=0.3
?X is binomial with ?=10n=10 and ?=0.7p=0.7
?X is Normal with ?=7μ=7 and ?=1.45σ=1.45
If ?Y is the number of word errors caught, what is the distribution of ?Y ? Select an answer choice.
?Y is binomial with ?=10n=10 and ?=0.7p=0.7
?Y is binomial with ?=10n=10 and ?=0.3p=0.3
?Y is approximately Normal with ?=3μ=3 and ?=1.45σ=1.45
?Y is Normal with ?=7μ=7 and ?=1.45σ=1.45
(b) What is the mean number of errors caught? (Enter your answer as a whole number.)
mean of errors caught =
What is the mean number of errors missed? (Enter your answer as a whole number.)
mean of errors missed =
(c) What is the standard deviation of the number of errors caught? (Enter your answer rounded to four decimal places.)
standard deviation of the number of errors caught =
What is the standard deviation of the number of errors missed? (Enter your answer rounded to four decimal places.)
standard deviation of the number of errors missed =
In: Math
In a study conducted by WOMMA (Word of Mouth Marketing Association), 81% of consumers are influenced by a friend's social media posts. Their research also revealed that the average American mentions a brand some sixty times a week in online and offline conversations. How powerful and influential is social media word-of-mouth to a brand or a public figure? Find an example of where social word-of-mouth has made or broken an organization and an example where it has changed government or culture.
In: Operations Management
An English word is called palindrome if its meaning may be interpreted the same way in either forward or reverse direction. Some examples of common palindromic words: civic, radar, level, rotor, noon, etc.
Design an algorithm that takes a word as input and decides if the input word is palindrome. In your algorithm, a stack should be used. Describe the pseudo-code of your algorithm. What is the time complexity of your algorithm in big-O?
PLEAS USE PSEUDO-CODE.
In: Computer Science
Using java, create a class called MyString that has one String
called word as its attribute and the following methods:
Constructor that accepts a String argument and sets the
attribute.
Method permute that returns a permuted version of word. For this method, exchange random pairs of letters in the String. To get a good permutation, if the length of the String is n, then perform 2n swaps.
Use this in an application called Jumble that prompts the user
for a word and the required number of jumbled versions and prints
the jumbled words. For example,
Enter the word: mixed
Enter the number of jumbled versions required: 10
xdmei eidmx miexd emdxi idexm demix xdemi ixdme eximd xemdi xdeim
Notes:
1. It is tricky to swap two characters in a String. One way to
accomplish this is to convert your String into an array of
characters, swapping the characters in the array, converting it
back to a String and returning it.
char[] chars = word.toCharArray(); will convert a String word to a
char array chars.
String result = new String(chars); converts a char array chars into
a String.
In: Computer Science
There are two calsses: node.py and a5.py. The a5.py contains three important methods:
The task is to fill in these methods given in the a5.py. Hints are given to you inside the a5.py class so make sure to check them out. Note that one of the important concepts in this example is that when a new element is inserted into the list, it gets inserted into it’s appropriate (sorted) position. Please take a look at the examples to see how random values are inputted and the result is sorted.
Please enter a word (or just hit enter to end): bottle
Please enter a word (or just hit enter to end): a
Please enter a word (or just hit enter to end): water Please enter a word (or just hit enter to end): of Please enter a word (or just hit enter to end):
The structure contains 4 items: a bottle of water
Please enter a word (or just hit enter to end): Ana
Please enter a word (or just hit enter to end): Bill
Please enter a word (or just hit enter to end): car
Please enter a word (or just hit enter to end): algorithm Please enter a word (or just hit enter to end): button Please enter a word (or just hit enter to end):
The structure contains 5 items: algorithm Ana Bill button car
NODE.PY
"""File: node.py
Node classes for one-way linked structures and two-way
linked structures."""
class Node(object):
def __init__(self, data, next = None):
"""Instantiates a Node with default next of None"""
self.data = data
self.next = next
A5.PY
"""
File: a5.py
Define a length function.
Define a printStructure function.
Define an insert function.
Test the above functions and the Node class.
"""
from node import Node
def length(head):
"""Returns the number of items in the linked
structure
referred to by head."""
probe = head
count = 0
# ADD CODE HERE: Count the number of nodes in
the structure
return count
def insert(newItem, head):
"""Inserts newItem at the correct position
(ascending order) in
the linked structure referred to by head.
Returns a reference to the new
structure."""
# if head == None:
# if structure is
empty
# ADD CODE
HERE
# else:
#Insert newItem in its
place (ascending order)
# ADD CODE HERE
return head
def printStructure(head):
"""Prints the items in the structure referred to
by head."""
# ADD CODE HERE
def main():
"""Gets words from the user and inserts in
the
structure referred to by head."""
head = None
userInput = input('Please enter a word (or just
hit enter to end): ')
while userInput != '':
head = insert(userInput,
head)
userInput =
input('Please enter a word (or just hit enter to end): ')
print('The structure contains', length(head),
'items:')
printStructure(head)
if __name__ == "__main__": main()
In: Computer Science
Recommend how projected financial statements and other measures of business performance could be used by a manufacturing company to evaluate its activities and processes. (minimum word count 700 words )
Take note of word count
In: Finance
In: Economics
Write code in Python that does the following : An anagram is
when the order of a word can be changed to create a new word
(evil,
live, and vile for example). Using the dictionary provided, find
all of the anagram groups.
Which words contain the most anagrams? How large is this group?
Here is another example:
Alert, alter, and later have 3 in their group. Use the provided
dict.txt as your word list,
solution must also finish in less than a minute.
* I know there is no dict.txt file to use here..
file = open("dict.txt", "r", encoding="utf8")
*looking for a way to sort through the file and group anograms together
*output the groups from largest to smallest (if there is only a
single word in a group, no need to display)
file.close()
In: Computer Science