a. What is the probability that a random email will be a spam and will not contain the word āfreeā in its subject line? Please show your work.
b. If the word āfreeā does not appear in the subject line of an email, what is the probability that the email is not a spam? Please show work. [2 points]
In: Statistics and Probability
Please, write code in c++. Using iostream library.
Most modern text editors are able to give some statistics about
the text they are editing. One nice statistic is the average word
length in the text. A word is a maximal continuous sequence of
letters ('a'-'z', 'A'-'Z'). Words can be separated by spaces,
digits, and punctuation marks. The average word length is the sum
of all the words' lengths divided by the total number of
words.
For example, in the text "This is div2 easy problem". There are 5 words: "This"is"div"easy" and "problem". The sum of the word lengths is 4+2+3+4+7 = 20, so the average word length is 20/5 = 4.
Given a text, return the average word length in it. If there are no words in the text, return 0.0.
Input
The first line will contain the text of length between 0 and 50
characters inclusive. Text will contain only letters ('a'-'z',
'A'-'Z'), digits ('0'-'9'), spaces, and the following punctuation
marks: ',', '.', '?', '!', '-'. The end of text will be marked with
symbol '#' (see examples for clarification).
Output
Output should contain one number - the average length. The returned
value must be accurate to within a relative or absolute value of
10-9.
example:
input:
This is div2 easy problem.#
output:
4.0
In: Computer Science
Consider the word 8 letter word PARALLEL
(a) how many distinguishable ways can you arrange the letters?
(b) In how many distinguishable ways can you arrange the letters so that none of the L's are together?
In: Statistics and Probability
Complete a minimum 700-word product strategy in MicrosoftĀ® Word. Incorporate a product strategy that addresses the following:
In: Economics
public int getIndexOfWord(String[] arr, String word){
// if found, return the index of word, otherwise return -1
}
public boolean areArrays(int[] arr1, int[] arr2){
// 1. initial check: both arrays need to have the same length,
return false if not the same
// 2. return true if both given arrats are equals(same values in
the same indices), false otherwise
}
public boolean areArraysEqual(String[] arr1, String[] arr2){
// 1. initial check: both arrays need to have the same length,
return false if not the same
// 2. return true if both given arrays are equals(same values in
the same indices), false otherwise
}
In: Computer Science
match word count, include analysis and do not waste word count on extended definitions.
question 3 :Explain what is national culture and its main six dimensions with example for each (650 words)....the six national culture dimension :
ā¢High versus low power distance
ā¢High versus low uncertainty avoidance
ā¢Masculinity versus femininity
ā¢Collectivism versus Individualism
ā¢Long Term versus Short Term Orientation
ā¢Indulgence versus Restraint.
In: Operations Management
Cindy transmitted a four-letter word to Donald. After her computer took the ASCII representation for the word and applied the Hamming(7,4) code, Bob received this:
1100011 0011001 1011010 1111111 0010010 0111110 1101010
Unfortunately, there were a number of errors in the transmission. Fortunately, however, there was never more than one bit error in any 7-bit block, and hence the Hamming(7,4) code was able to fix them all. Type in the four-letter word (using letters of the alphabet) that Cindy originally sent, in lower case. (Note: Assume that the data occurs in the format we described in class whereby the three parity bits follow the four data bits, i.e. d1 d2 d3 d4 p1 p2 p3 . This may differ from the order found in descriptions of Hamming(7,4) found on the web.)
In: Statistics and Probability
1. Open Microsoft Word
2. On the first line, type the words Word VBA Test Bed
3. Save the document as WordVBATestBed.docm. (It is vital that this is a macro-enabled document.)
4. Ensure that the Developer Tab is visible.
5. Ensure that the Visual Basic Editor is setup in accordance with pages 87 and 88 in the textbook.
6. Insert a module into this document.
7. Add the Option Base 1 instruction under Option Explicit.
4. Using the Visual Basic Editor, create a VBA procedure named create_object that does the following: a. Creates a variable of the Object type. b. Using the Set command, assign the third word of the first paragraph of the active document to the variable. c. Using appropriate methods, make the object bold. d. When you test the procedure, the third word of your document (test) should be bold.
It just needs to have "Option Explicit" at the beginning.
In: Computer Science
C++
Develop program in C++ using arrays of characters, subscript operator, the cstring library, and functions with arguments. Create programs with small functions where main goes to a series of functions where the real work takes place. Donāt use global variables and donāt use break within a loop (unless working with a switch statement). Functions canāt have more than 30 statements of code, not including comments, blank lines, or variable definitions. Donāt use a return in the middle of the loop
Most words in the English language are based on words from ancient Greek and Latin. Breaking down a word and understanding its root can really help in understanding the meaning of more complex words. A root can be at the beginning, middle, or end of a word. A root of a word has no prefix or suffix ā think of it as the most basic part of a word. Common prefix and suffix added to roots are things like:
Find the root of a word, so there is a better chance of understanding the meaning of the word.
Help the user find the root of a word by removing the affixes (both prefixes and suffixes). Limit the number of prefixes and suffixes to just 3 each that will be removed. Enter those from the user rather than hard-coding them.
Once the six affixes are supplied, the program should let the user enter in a sentence and get rid of all of the prefixes and suffixes to show what the sentence would be like in the most basic form. Words can be no longer than 20 characters and sentences no longer than 200 characters. Work word by word or process the entire sentence all at once.
In: Computer Science
Explain how one word might be open to interpretation.
Please make sure the answer is at least 250 words. ******250 words each and include a word count. Each question is worth 12.5 points.******
In: Psychology