Questions
in java (just a line of code will do) Your program will read in the text...

in java (just a line of code will do)

Your program will read in the text file, word by word. You are to ignore leading and trailing punctuation and capitalization (i.e., "Castle", "castle?", and "CASTLE" are all equivalent to castle). Convert all words to lower case on input, or you can use case-insensitive comparisons - your choice. You will be putting the words into several implementations of linked lists and comparing the results. If, after trimming punctuation, a "word" consists of no letters, then discard the word. Such a case might arise if your word-reading strategy assumes that every word is delimited by spaces, in which case, a dash would constitute a "word", but would not contain any letters, so it would be discarded (for example, "comparisons - your choice" should be three words, though your space-delimited parser might identify "-" as a fourth "word", but the “-“ should be discarded).

In: Computer Science

What is a warrant statement? (use your own word). What does it mean to interpret? (use...

  1. What is a warrant statement? (use your own word).
  2. What does it mean to interpret? (use your own word).
  3. What is classification? Why is classification important? (use your own word).
  4. What is analysis? What is an analytic essay? (use your own word).
  5. Thanks

In: Economics

Write a C++ program that inputs (cin) a word from the keyboard and generates several different...

Write a C++ program that inputs (cin) a word from the keyboard and generates several different scrambles of the word without using vectors. The input word can be from 4 to 10 letters in length. The number of scrambles produced depends on the number of letters in the word. e.g. the 4 letter word “lose” would have 4 different scrambles produced and the seven letter word “edition” would have seven different scrambles.

Here is a candidate example:     

Input: FLOOR

                Scrambles: ROOLF, OOLFR, OLFRO, LOORF, OORFL

Your program must use the same block of code for each input word. There is also the rand() random number generator available.

Test you program with these words:

salt
asteroid
manipulate

In: Computer Science

I wrote this code and it produces a typeError, so please can you fix it? import...

I wrote this code and it produces a typeError, so please can you fix it?

import random

def first_to_a_word():

print("###### First to a Word ######")
print("Instructions:")
print("You will take turns choosing letters one at a time until a word is formed.")
print("After each letter is chosen you will have a chance to confirm whether or not a word has been formed.")
print("When a word is formed, the player who played the last letter wins!")
print("One of you has been chosen at random to initiate the game.")
print()
print("Note: Words must be longer than a single letter!")
print()

  
#inputs / randomNumGen
player1 = input("Enter player 1's name: ")
player2 = input("Enter player 2's name: ")
random_number = random.randint(0, 1)
  
#output function
def output_func(player1, player2, random_number):
if random_number == 0:
word = input(player1, 'please enter a character: ')
print(player1, 'input:', word)
else:
word = input(player2, 'please enter a character: ')
print(player2, 'input:', word)
  
return word
  
#initial variables
word_confirm = ''
counter = 0
word_array = []
  
#character input loop
while word_confirm != 'yes':
  
#function call
word = output_func(player1, player2, random_number)
  
#append
word_array.append(word)
  
#alternate players turns
if random_number == 0:
random_number = 1
else:
random_number = 0
  
#check for exit after >=3 letters formed
if counter >= 2:
print('You have formed the letters:') #three letters
word_confirm = input('Has the word been formed? (type "yes" or "no"): ')
word_confirm = word_confirm.lower()
  
counter += 1
  
complete_word = ''
i = 0
while i < len(word_array):
  
complete_word += word_array[i]
i += 1
  
if random_number == 1:
print(player1, 'Wins!')
print('The word was:', complete_word)
else:
print(player2, 'Wins!')
print('The word was:', complete_word)
  
  

first_to_a_word()

In: Computer Science

Write a Java program that directs the user to enter a single word (of at least...

Write a Java program that directs the user to enter a single word (of at least four characters in length) as input and then prints the word out in reverse in the pattern shown below (please note that the spaces added between each letter are important and should be part of the program you write):

<Sample Output

Enter a word (at least four characters in length): cat

Word must be at least four characters in length, please try again. Enter a word (at least four characters in length): mountain

ח

ni

nia

niat

niatn

niatnu

naitanui

niat nuom

<End Output

If the user enters more than a single word, your program should perform the pattern with only the first word entered by the user:
Enter a word (at least four characters in length): Eggs Benedict

s

sg

sgg

sggE

<End Output

Create a complete class for your program named Rearrange Word and paste the entire class into the text box provided. Your class must contain a main method, and you should create at least two additional methods in your class to carry out the task described (one to reverse the word, the other to print out the reversed word in the pattern shown). Your program does not need to prompt the user for additional input beyond the first successful entry, it can simply terminate once the task has been completed.

In: Computer Science

Write a spell checking program (java) which uses a dictionary of words (input by the user...

Write a spell checking program (java) which uses a dictionary of words (input by the user as a string) to find misspelled words in a second string, the test string. Your program should prompt the user for the input string and the dictionary string. A valid dictionary string contains an alphabetized list of words.

Functional requirements:

  1. For each word in the input string, your program should search the dictionary string for the given word. If the word is not in the dictionary, you program should print the message "Unknown word found" to standard output.
  2. After traversing the entire input string, your program should print a message describing the total number of misspelled words in the string.
  3. A dictionary string may contain words in uppercase, lowercase, or a mixture of both. The test string may also combine upper and lower case letters. You program should recognize words regardless of case. So if "dog" is in the dictionary string, the word "dOG" should be recognized as a valid word. Similarly, if "CaT" is in the dictionary string, the word "cat" she be recognized as a valid word.
  4. Within a string, a word is a white-space delimited string of characters. So the last word in "Hello world!" is "world!".

In: Computer Science

Computer Architecture 1. Define what a "word" is in computer architecture: The size (number of bits)...

Computer Architecture

1. Define what a "word" is in computer architecture:

  1. The size (number of bits) of the address
  2. The total number of bits of an instruction (e.g. 16 bits)
  3. Word and width are synonymous.
  4. A word is the contents of a memory register.

2. What is the difference between a register’s width and a register’s address? (choose all that apply - there may be more than one correct answer)

  1. They are both the same!
  2. Address is the same for all registers, width is unique for each register.
  3. Width is the amount of data a single register holds, address is the location of the register within a larger chip.
  4. The address bits of a register is a logarithm of its width.

3. Which of the following is NOT implemented by the Program Counter?

  1. Set the counter to 0.
  2. Increase the counter by 1.
  3. Decrease the counter by 1.
  4. Set the counter to any input value.

4. What is the relationship between the size of the address (number of bits) and the word size for memory registers?

  1. address bits = 2^(word size)
  2. address bits = word size ^ 2
  3. address bits = word size
  4. address bits = log2(word size)
  5. address bits = (word size) / 2

In: Computer Science

Write a Java program that prompts the user to input a word (String). The program must...

Write a Java program that prompts the user to input a word (String).

The program must print the reversed word with all consecutive duplicate characters removed.

The program must contain the following classes: -

The StackX class (you can use the Java Stack class). - The Reverse class which must contain a private data field called “word” of type string, a constructor, and a void method called revNoDup(). The revNoDup() method must reverse the word and remove the consecutive duplicate characters. The revNoDup() method must print the new word (i.e. reversed with consecutive duplicate characters removed). The revNoDup() method must use a Stack to reverse the word and remove the duplicate characters. - The Test class which must contain the main() method. In the main() method, you must prompt the user to input a word (String), create an object from class Reverse, and call the revNoDup() method.

Here is a sample run:

Enter a word:

Tomorrow

woromoT

In: Computer Science

17) Refer the previous question: The following table gives the common disorders, problems and complaints associated...

17) Refer the previous question: The following table gives the common disorders, problems and complaints associated with each body system and its components relevant to the nursing care you might provide for your clients in the Australian health care system. Complete the following table with regard to its definition, pathophysiology, signs and impact of specific health procedures(in 10-20 words each). DISEASES AFFECTING THE MUSCULOSKELETAL SYSTEM Gout Gout

17.1) Definition Minimum word required : 10 Word count

17.2) Briefly outline the pathophysiology Minimum word required : 10 Word count

17.3) List four specific signs Minimum word required : 10 Word count

17.4) Impact of allopurinol on patients with gout. Minimum word required : 10

In: Nursing

Pig Latin is a language constructed by transforming English words. The following rules are used to...

Pig Latin is a language constructed by transforming English words. The following rules are used to translate English into Pig Latin:

*If the word begins with a consonant, then all consonants at the beginning of the word, up to the first vowel are removed then added to the end of the word, followed by “ay”. For example, “computer” becomes “omputercay” and “think” becomes “inkthay”.

*If the word begins with a vowel, then “way” is added to the end of the word. For example, “algorithm” becomes “algorithmway” and “office” becomes “officeway”.

*If the word ends in a punctuation mark, then the punctuation mark should remain at the end of the word after the transformation has been performed. For example, “science!” should become “iencescay!”. You can assume that the punctuation mark is only a single character. The program reads a line of text from the user and translates it into Pig Latin and displays the result.

This is in python.

In: Computer Science