I need the code for a C++ program that creates an array of 5000 String objects that will store each word from a text file. The program will read in each word from a file, and store the first 5000 words in the array. The text file should be read in from the command line.
In: Computer Science
500 word response What is Big Data? Why is it important? Where does Big Data come from?
500 word NO SCREEN SHOTS OR IMAGES OF RESPONSE. PLEASE TYPE YOUR ANSWER OR UPLOAD DOCUMENT
IF REQUIREMENTS MENTIONED ABOVE ARE NOT MET I WILL GIVE A NEGATIVE RATING
In: Operations Management
Problem:
Perform the word counter problem through MapReduce.
Tools: Anaconda/Python 3/Jupyter Notebook
Example word: “One a penny, two a penny, hot cross buns.”
Submitted files: (1) Source code (adding comments); (2) Supporting document for code comments
In: Computer Science
This exercise I will list a series of words I want you to give me both denotative (actual dictionary definition) & connotative (personal meaning or reaction to the word).
Word List:
Work, loyalty, parent, education, professionalism, family, partner, student, tradition, infidelity, boss, & love
In: Psychology
Q: What is your favorite program or initiative launched by the de Blasio administration? (250 word minimum)*
Q: Why do you want to work in the Mayor’s Office? (250 word minimum)*
Help me come with a different perspective, I'm struggling with ideas. Thank You!
In: Economics
5.16 Implement function indexes() that takes as input a word (as a string) and a onecharacter letter (as a string) and returns a list of indexes at which the letter occurs in the word.
>>> indexes('mississippi', 's')
[2, 3, 5, 6]
>>> indexes('mississippi', 'i')
[1, 4, 7, 10]
>>> indexes('mississippi', 'a')
[]
In: Computer Science
**Use C** You will write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the text. The first number denotes the position of a word in the key text (starting at 0), and the second number denotes the position of the letter in the word (also starting at 0). For instance, given the following key text (the numbers correspond to the index of the first word in the line)
[0] 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe;
[13] All mimsy were the borogoves, And the mome raths outgrabe.
[23] "Beware the Jabberwock, my son! The jaws that bite, the claws that catch!
[36] Beware the Jubjub bird, and shun The frumious Bandersnatch!"
[45] He took his vorpal sword in hand: Long time the manxome foe he sought—
The word "computer" can be encoded with the following pairs of numbers:
35,0 catch
5,1 toves
42,3 frumious
48,3 vorpal
22,1 outgrabe
34,3 that
23,5 Beware
7,2 gyre
Placing these pairs into a cipher text, we get the following:
35,0,5,1,42,3,48,3,22,1,34,3,23,5,7,2
If you are encoding a phrase, rather than just a single word, spaces in the original english phrase will also appear in the ciphered text. So, the phrase "all done" (using the above Jabberwocky poem) might appear as: 0,3,1,4,13,1 6,0,46,2,44,2,3,2
Only spaces in the key text should be considered delimiters. All other punctuation in the key text are to be considered part of a key word. Thus the first word in the Jabberwocky poem, 'Twas, will have the following characters and positions for key word 0:
Position 0: '
Position 1: T
Position 2: w
Position 3: a
Position 4: s
Developing the Program:
You should approach this assignment in several parts. The first part will be to write a menu driven program that prompts the user for the following actions:
For each choice, create a stub function that will be completed in the remaining steps.
After testing your menu, continue to fill in the stub functions with the following specifications:
Choice #1
For this menu choice, you will prompt the user for the name of a cipher text file (such as the Declaration of Independence). You will read this text file line by line, and place each word, in order, in an array of char strings. As you copy each word into the array, you will keep a running count of the number of words in the text file and convert the letters of each word to lower case. You may assume that you will use no more than the first 5,000 words in the text, and no more than the first 15 characters in a word. However, there is no guarantee that the text will have 5000 words or less and any word in the text is 15 characters or less.
Choice #2
If no file has been chosen for Choice #1 (i.e. the user goes directly to Choice #2 without first choosing Choice #1), you will first prompt the user to enter a cipher text and read it into memory (presumably by calling the function that would be called by Choice #1). You will prompt the user to enter a secret message (in plain text - such as "Computer Science is the best major at GMU!") that is terminated by pressing the "Enter" key. You can assume that the length of this message will be less than 1500 characters (including the carriage return and NULL terminator). You will then parse this message, character by character, converting them to lower case as you go, and find corresponding characters in the words found in the key text word array. You can do this by going through each word in the word array, and then each character in each word, until you find a match with the current message character. There are more efficient ways to perform this operation, and you are encouraged to implement them instead of the given method. Once a character match is found, you will write the index of the word and the index of the character to a character string that you will later write out to a text file. Spaces are to be placed into the text as found in the message and will be used to delimit the separate words in the secret message. Once the message has been encoded, prompt the user for the name of a file to save the encoded message to, and save it to that file.
Choice #3
You will prompt the user for the name of a file containing an encoded text (i.e. a file containing number pairs). Your program will read the file and decode the the text using the indexes pairs given for each character in the word and the text file chosen for Choice #1. If no file has been chosen for Choice #1 (i.e. the users goes directly to Choice #3 without first choosing Choice #1), you will prompt the user to enter a cipher text and read it into memory (presumably by calling the function that would be called by Choice #1). Spaces found in the file are to be treated as spaces in the decoded text. You can assume that the number of characters in the encoded text file is 5000 or less, including any carriage returns or NULL terminator characters. Once the text is decoded, print the message to standard output.
Choice #4
Exit the program.
Additional Specifications:
In: Computer Science
**Use C** You will write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the text. The first number denotes the position of a word in the key text (starting at 0), and the second number denotes the position of the letter in the word (also starting at 0). For instance, given the following key text (the numbers correspond to the index of the first word in the line)
[0] 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe;
[13] All mimsy were the borogoves, And the mome raths outgrabe.
[23] "Beware the Jabberwock, my son! The jaws that bite, the claws that catch!
[36] Beware the Jubjub bird, and shun The frumious Bandersnatch!"
[45] He took his vorpal sword in hand: Long time the manxome foe he sought—
The word "computer" can be encoded with the following pairs of numbers:
35,0 catch
5,1 toves
42,3 frumious
48,3 vorpal
22,1 outgrabe
34,3 that
23,5 Beware
7,2 gyre
Placing these pairs into a cipher text, we get the following:
35,0,5,1,42,3,48,3,22,1,34,3,23,5,7,2
If you are encoding a phrase, rather than just a single word, spaces in the original english phrase will also appear in the ciphered text. So, the phrase "all done" (using the above Jabberwocky poem) might appear as: 0,3,1,4,13,1 6,0,46,2,44,2,3,2
Only spaces in the key text should be considered delimiters. All other punctuation in the key text are to be considered part of a key word. Thus the first word in the Jabberwocky poem, 'Twas, will have the following characters and positions for key word 0:
Position 0: '
Position 1: T
Position 2: w
Position 3: a
Position 4: s
Developing the Program:
You should approach this assignment in several parts. The first part will be to write a menu driven program that prompts the user for the following actions:
For each choice, create a stub function that will be completed in the remaining steps.
After testing your menu, continue to fill in the stub functions with the following specifications:
Choice #1
For this menu choice, you will prompt the user for the name of a cipher text file (such as the Declaration of Independence). You will read this text file line by line, and place each word, in order, in an array of char strings. As you copy each word into the array, you will keep a running count of the number of words in the text file and convert the letters of each word to lower case. You may assume that you will use no more than the first 5,000 words in the text, and no more than the first 15 characters in a word. However, there is no guarantee that the text will have 5000 words or less and any word in the text is 15 characters or less.
Choice #2
If no file has been chosen for Choice #1 (i.e. the user goes directly to Choice #2 without first choosing Choice #1), you will first prompt the user to enter a cipher text and read it into memory (presumably by calling the function that would be called by Choice #1). You will prompt the user to enter a secret message (in plain text - such as "Computer Science is the best major at GMU!") that is terminated by pressing the "Enter" key. You can assume that the length of this message will be less than 1500 characters (including the carriage return and NULL terminator). You will then parse this message, character by character, converting them to lower case as you go, and find corresponding characters in the words found in the key text word array. You can do this by going through each word in the word array, and then each character in each word, until you find a match with the current message character. There are more efficient ways to perform this operation, and you are encouraged to implement them instead of the given method. Once a character match is found, you will write the index of the word and the index of the character to a character string that you will later write out to a text file. Spaces are to be placed into the text as found in the message and will be used to delimit the separate words in the secret message. Once the message has been encoded, prompt the user for the name of a file to save the encoded message to, and save it to that file.
Choice #3
You will prompt the user for the name of a file containing an encoded text (i.e. a file containing number pairs). Your program will read the file and decode the the text using the indexes pairs given for each character in the word and the text file chosen for Choice #1. If no file has been chosen for Choice #1 (i.e. the users goes directly to Choice #3 without first choosing Choice #1), you will prompt the user to enter a cipher text and read it into memory (presumably by calling the function that would be called by Choice #1). Spaces found in the file are to be treated as spaces in the decoded text. You can assume that the number of characters in the encoded text file is 5000 or less, including any carriage returns or NULL terminator characters. Once the text is decoded, print the message to standard output.
Choice #4
Exit the program.
Additional Specifications:
In: Computer Science
In this project, you will be expanding on recent In-Class Activity to create a basic Scrabble Game. You do not need to worry about the game board, just the logic of the game. You may have up to 3 programmers in your group.
In this version of the game, players indicate how many rounds of play there will be for two players. Then each player will take turns entering words until the number of rounds are complete. In order for a word to be accepted, a letter in the word must correspond to a letter in a previous word. The exception is for the first word entered will be accepted without validating as there is nothing to validate against.
Values for messages List
Format Text Replacement will be used for the {} Text. See https://pyformat.info/ for more information on how to use the format() method.
Point Values Per Letter for points Dictionary
To use this call points['a'], where a is any lowercase letter you want to find the point value for.
Data Types for Variables
Rubric / Grading Scale
Total Points: 50
Additional Grading Notes
Here is what i have so far... i need help
# Function 1: Input Player Rounds
def inputRounds():
try:
rounds = int(input("Please enter the number of rounds you would like to play: "))
except:
rounds = 2
print("Invalid response using default value of: ", rounds)
print(rounds)
return None
# Function 2: Input Player Word
def inputWord():
word = str(input("Please enter your word: "))
return(word)
# Function 3: Validate Word
def validWord():
return None
# Function 4: Generate Score
def playerScore():
return None
# Method 5: Initialize List with Messages
def initMessages():
messages = [
'Player {} Wins with a score of {}!',
'Tie Game, no winners.',
'Invalid word! Player {} Wins!',
'Invalid word! You must enter a valid word to start.',
'Player {} Entered the Words:'
]
return messages
# Function 6: Initialize Points Dictionary
def initPoints():
points = {
"a": 1 , "b": 3 , "c": 3 , "d": 2 ,
"e": 1 , "f": 4 , "g": 2 , "h": 4 ,
"i": 1 , "j": 8 , "k": 5 , "l": 1 ,
"m": 3 , "n": 1 , "o": 1 , "p": 3 ,
"q": 10, "r": 1 , "s": 1 , "t": 1 ,
"u": 1 , "v": 4 , "w": 4 , "x": 8 ,
"y": 4 , "z": 10
}
return points
# Main Program
if __name__ == '__main__':
# Initialize Player Variables
# Declare Variables
points = initPoints()
messages = initMessages()
# Start Game Below
inputRounds()
inputWord()
In: Computer Science
question:
Bits 0 and 1 are transmitted in the data transmission channel, due to a noise, a single bit is incorrectly received by a probability of 0.3 , Playback For encoding instead of bit 0, the code word 00000 and bit 1 are transmitted as code word 11111,The receiver decodes the codeword received by selecting the most frequently occurring bit , for example 00000 → 0, 01010 →
(a) What is the probability that the received code word is correctly decoded?
(b) When millions of bits are transmitted over the data channel over the above repetition coding, what is the expected value of decoded codewords incorrectly?
In: Statistics and Probability