Write a program that converts an English phrase into pseudo-Pig Latin phrase (that is Pig Latin that doesn't allow follow all the Pig Latin Syntax rules.) Use predefined methods of the Array and String classes to do the work. For simplicity in your conversion, place the first letter as the last character in the word and prefix the characters "ay" onto the end. For example, the word "example" would become "xampleay" and "method" would become "ethodmay." Allow the user to input the English phrase. After converting it, display the new Pig Latin phrase. Submit to the Assignment folder the zipped source file of your project. Must be in C#.
In: Computer Science
The awk commands to print the first and third words (with a
space between) from each line of the input that has the substring
'cat' in the second word (assume all lines have at least three
words). Note, words are fields in this case. Your output should be
a copy of each input line with the substring 'cat' in the second
word and also, with just the first and third words printed. A
series of comments that fully describes your awk commands,
including a description of the purpose of each function call, and
the arguments to each function.
using the command awk -f quest1.awk input.txt where 'input.txt' is
the input file..
In: Computer Science
11. Suppose that a 32M × 16 memory built using 512K × 8 RAM chips and memory is word-addressable.
a) How many RAM chips are necessary?
b) If we were accessing one full word, how many chips would be involved?
c) How many address bits are needed for each RAM chip?
d) How many banks will this memory have?
e) How many address bits are needed for all of memory?
f) If high-order interleaving is used, where would address 14 (which is E in hex) be located?
g) Repeat Exercise 11f for low-order interleaving.
In: Computer Science
Python Language - Cant seem to get the correct output. Also, need through explanation if possible. much appreciative
|
XXXXX PYTHON>>>>>>>>> Write a function named shareOneLetter that takes one parameter, wordList a list of words. Create and return a dictionary in which each word in
wordList is a key and the corresponding value is a list of
all the words in wordList that share at least one letter
with that word. There should be no duplicate For example, the following is correct
output: |
In: Computer Science
In: Accounting
use the python language and fix the error code
#Write a function called rabbit_hole. rabbit_hole should
have
#two parameters: a dictionary and a string. The string may be
#a key to the dictionary. The value associated with that key,
#in turn, may be another key to the dictionary.
#
#Keep looking up the keys until you reach a key that has no
#associated value. Then, return that key.
#
#For example, imagine if you had the following dictionary.
#This one is sorted to make this example easier to follow:
#
# d = {"bat": "pig", "pig": "cat", "cat": "dog", "dog":
"ant",
# "cow": "bee", "bee": "elk", "elk": "fly", "ewe": "cod",
# "cod": "hen", "hog": "fox", "fox": "jay", "jay": "doe",
# "rat": "ram", "ram": "rat"}
#
#If we called rabbit_hole(d, "bat"), then our code should...
#
# - Look up "bat", and find "pig"
# - Look up "pig", and find "cat"
# - Look up "cat", and find "dog"
# - Look up "dog", and find "ant"
# - Look up "ant", and find no associated value, and so it
would
# return "ant".
#
#Other possible results are:
#
# rabbit_hole(d, "bat") -> "fly"
# rabbit_hole(d, "ewe") -> "hen"
# rabbit_hole(d, "jay") -> "doe"
# rabbit_hole(d, "yak") -> "yak"
#
#Notice that if the initial string passed in is not a key in
#the dictionary, that string should be returned as the result
as
#well.
#
#Note, however, that it is possible to get into a loop. In
the
#dictionary above, rabbit_hole(d, "rat") would infinitely go
#around between "rat" and "ram". You should prevent this: if
a
#key is ever accessed more than once (meaning a loop has been
#reached), return the boolean False.
#
#Hint: If you try to access a value from a dictionary that
does
#not exist, a KeyError will be raised.
#Write your function here!
def rabbit_hole(d,word):
for key in d.keys():
if word == key:
new_key = d[word]
word = new_key
continue
elif word != key:
pass
return d[word]
#Below are some lines of code that will test your
function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: ant, hen, doe, yak, False, each on their own line.
d = {"bat": "pig", "pig": "cat", "cat": "dog", "dog": "ant",
"cow": "bee", "bee": "elk", "elk": "fly", "ewe": "cod",
"cod": "hen", "hog": "fox", "fox": "jay", "jay": "doe",
"rat": "ram", "ram": "rat"}
print(rabbit_hole(d, "bat"))
print(rabbit_hole(d, "ewe"))
print(rabbit_hole(d, "jay"))
print(rabbit_hole(d, "yak"))
print(rabbit_hole(d, "rat"))
In: Computer Science
What is the purpose and use of personal financial statements and budgets for successful financial planning and wealth management?500-800 word IN DEPTH ANSWER PLEASE. REFERENCES SOURCES PLEASE
In: Finance
What is the purpose and use of personal financial statements and budgets for successful financial planning and wealth management?500-800 word IN DEPTH ANSWER PLEASE. REFERENCES SOURCES PLEASE
In: Finance
what do you see as the economic impact of the COVID-19
relief checks? how do you figure to the idea of transfer
payments?
(a 200 word response is ideal)
In: Economics
Minimum of a 500-word personal essay that demonstrates a life-changing event the applicant has overcome and why he/she has chosen to pursue a career in healthcare (nursing)
In: Nursing