Questions
Python 1.)Assume that name is a variable of type String that has been assigned a value....

Python 1.)Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the last character of the value of name. So if the value of name were "Blair" the expression's value would be 'r'. 2.)Assume that word is a variable of type String that has been assigned a value. Write an expression whose value is a String consisting of the last three characters of the value of word. So if the value of word were "biggest" the expression's value would be "est".

In: Computer Science

Python This part involves creating a function that will manage a List of unique strings. The...

Python

This part involves creating a function that will manage a List of unique strings. The function is passed a string and a list as arguments. It passes a list back.

  1. The function to add a word to a List if word does not exist in the List. If the word does exist in the List, the function does nothing.

  2. Create a test program that takes a string as input and then calls the function over and over until the user enters "Done." If the string "Done" is entered, the program sorts the list and prints it out line by line.

In: Computer Science

An experiment consists of randomly rearranging the 10 letters of the word QUARANTINE into a sequence...

An experiment consists of randomly rearranging the 10 letters of the word QUARANTINE
into a sequence of 10 letters, where all possible orders of these 10 letters are equally likely. Find the probability of each of the following events:


(1) the first three letters include no A’s;

(2)  the first three letters or the last three letters (or both) include no A’s;


(3) the fourth letter is the first A;

(4) the first letter and the last letter are the same;

(5) the word ‘QUARANTINE’ is obtained;


(6) the sequence contains the word ‘RAN’.

In: Statistics and Probability

Translate the following medical terms based on your knowledge of suffixes, prefixes (if present) and combining...

Translate the following medical terms based on your knowledge of suffixes, prefixes (if present) and combining forms. Please do not give me the dictionary definition meaning only include the word parts that are present in the term. So first identify the word parts present and then translate only using those word parts

Colectomy                            

Colonoscopy                         

Dentalgia                               

Gastroenteritis            

Gastrojejunostomy      

Gingivectomy              

Glossopharyngeal                

Glycolysis                             

Hepatomegaly                       

Cholecystojejunostomy            

Sublingual                               

Lipase                                    

Cholecystolithiasis             

Periodontal                          

Palatoplasty                         

Sialadenectomy                   

Steatorrhea                           

Hematochezia                        ­­­­

Hyperbilirubinemia

In: Anatomy and Physiology

What is the value stored in variable perimeter after the code has been executed? (6 pts)...

What is the value stored in variable perimeter after the code has been executed? (6 pts)

.data

              length:        .word 16

              width:        .word 24

              perimeter:     .word 0

       .text

              la $s0, length

              la $s1, width

              la $s2, perimeter

              lw $s3,0($s0)

              lw $s4, 0($s1)

              add $s3, $s3, $s3

              add $s4, $s3, $s4

              add $s5, $s3, $s4

              sw $s5, 0($s2)

Perimeter:__________________________________________

In: Computer Science

Describe any two of the following--Ebola, HIV/AIDS, Chagas, or Schistosomiasis--from the standpoint of the relationships between...

  • Describe any two of the following--Ebola, HIV/AIDS, Chagas, or Schistosomiasis--from the standpoint of the relationships between (1) culture/economy and disease; (2) cities/towns and disease; (3) environmental change and disease; and (4) human ecology and disease.
  • Within the above framework, how do the two diseases reflect “negative externalities” and “Karl Polanyi’s Paradox” (as defined in GPCC)?

250 word minimum; no maximum word count. Display the word count at the end of your post.

In: Nursing

Q3: Suppose that of all individuals buying a certain personal computer, 60% include a word processing...

Q3: Suppose that of all individuals buying a certain personal computer, 60% include a word processing program in their purchase, 40% include a spreadsheet program, and 30% include both types of programs. We are interested in knowing the inclusion of the programs.

a) Write out the sample space for the problem.

b) Find the probability that a word processing program was included given that the selected individual was included a spreadsheet program.

c) Are the vents “word processing program was included” and the event “selected individual was included a spreadsheet program” independent?

In: Statistics and Probability

1. It is quite interesting that most of us are likely to be able to read...

1. It is quite interesting that most of us are likely to be able to read and comprehend words, even if the alphabets of these words are scrambled (two of them) given the fact that the first and last alphabets remain the same. For example,

“I dn'ot gvie a dman for a man taht can olny sepll a wrod one way.” (Mrak Taiwn)

“We aer all moratls, Hamrbee is an immoratl, and tehre is no question abuot it.” (Kevin Unknown)

2. Write a method named scramble that returns a String and takes a String as an argument.

A. The argument is actually a word (of length 6 or more).

B. It then constructs a scrambled version of that word, randomly flipping two characters other than the first and last one.

3. Then write the main method in which you would read the word from the user, send it to scramble, and print the scrambled word.

A. You can use a loop to read multiple words if you like but it is not necessary.

B. If the length of the entered word is less than 6, you should keep prompting the user to enter a valid word.

4. After writing all the comments, generate a Javadoc and submit it with the java file.

Hint: First generate two random integers in range of the length of the string. Then use substring method to access characters at those locations. Rest is left to your imagination.

In: Computer Science

This is to done in Java: create the infrastructure for building a word cloud application. We...

This is to done in Java: create the infrastructure for building a word cloud application. We will do so by 1) Reading the content of a text file and creating a binary tree of words in that file. When a duplicate word is encountered. we simply increase the frequency count of that word in its corresponding node. In other words, the nodes in the tree have two parts. One part maintains the word, and the other maintains the frequency count. It should also be noted that words will not be case sensitive, hence three variations of the word (hello, Hello, HELLO), should be stored in the same node in the tree, and it should have a frequency of 3. 2) Once the binary tree of words (including their frequency) has been created, we need to print the words and their frequency count (one word per line). (Use InOrder() traversal to display the words and their frequency count) The data to be read is provided by the instructor in a text file and we are supposed to use FileReader to read character by charcter and use delimiters like spaces,endofline, tab, etc., to figure out when the words begin and end, and store the words in the binary tree nodes. No duplicate nodes, instead increment frequency counter in each node. I have a basic grasp of how this should work in theory but I can't quite figure it out in code.

In: Computer Science

Please, write code in c++. Using iostream library Most modern text editors are able to give...

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.


Samples:

Input Output
1 This is div2 easy problem.# 4.0
2 a bc# 1.5
3 w84lFC1hD2ot2?43 Jnw67Kmt8KhOQn# 2.714285714

In: Computer Science