Questions
THE NOT REPLACE PROBLEM Must use loops. Please do not use sequence of if statements. I...

THE NOT REPLACE PROBLEM

Must use loops. Please do not use sequence of if statements.

I need it in C++.

Given an input string, set result to a string where every appearance of the lowercase word "is" has been replaced with "is not". The word "is" should not be immediately preceded or followed by a letter -- so for example the "is" in "this" does not count.  

• for input of "is test" → "is not test"

• for input of "is-is" → "is not-is not"

• for input of "This is right" → "This is not right"

In: Computer Science

Find solutions for your homework Find solutions for your homework Search home / study / science...

Find solutions for your homework Find solutions for your homework Search home / study / science / nursing / nursing questions and answers / grammar check! "i never said she stole my money." did you know that this sentence changes its ... Your question has been answered Let us know if you got a helpful answer. Rate this answer Question: Grammar Check! "I never said she stole my money." Did you know that this sentence changes its mea... Grammar Check! "I never said she stole my money." Did you know that this sentence changes its meaning depending on which word you stress? Practice your grammar skills by stressing each word in the sentence; notice how the part of speech stressed affects the meaning of the sentence. Which word did you stress first? What meaning does that sentence have? Which word is the most awkward for you to stress? What meaning does THAT sentence have?

In: Nursing

Write a program named "cleanDocument.pl" that will do the following: Reads two parameters from the command...

Write a program named "cleanDocument.pl" that will do the following:

  • Reads two parameters from the command line (@ARGV)
    • The first parameter is the name of a file and the second parameter is a word
    • If no command line parameters are present, it asks the user to input the values
  • Opens the text file that is passed as the first command line argument
  • Loops through the lines of the text file and replaces all occurrence of the word (the second command line parameter) with an equal number of dashes (that is the same amount of dashes as the word length)
  • It then overwrites the file with the new replaced data

Below is an example of how the program works:

Calling the Perl file on the command line like so:

$ cleanDocument.pl document.txt bobsled

or

$ cleanDocument.pl
$ What file do you want to open? document.txt
$ What word do you want to replace? bobsled

If the file looks like below:

$ cat document.txt

I like to use my bobsled during the winter. Whenever I bobsled I have a lot of fun.

Then it will be become:

$ cat document.txt

I like to use my ------- during the winter. Whenever I ------- I have a lot of fun.

In: Computer Science

1. Calculate the markup rate based on selling price for the following item. Round percents to...

1.

Calculate the markup rate based on selling price for the following item. Round percents to the nearest whole percent.

Cost Selling Price Markup Rate
$151.21 $288.00 %

2.

Complete the following word problem.

What is the cost if the markup is 55% of the selling price and the selling price is $128? Round dollar amounts to the nearest cent.
$

3.   Complete the following word problem.

What is the cost of an item that sells for $130 and 60% markup is based on selling price? Round dollar amounts to the nearest cent.
$

4. Complete the following word problem.

An item's selling price is $19.99 and the markup amount is $12.12. What is the cost? Round dollar amounts to the nearest cent.
$

5. Complete the following word problem.

A lamp sells for $125.50 and costs $59.80. What is the markup rate based on selling price? Round percents to the nearest whole percent.
%

6.

Calculate the selling price when cost and markup rate are based on selling price for the following item. Round dollar amounts to the nearest cent.

Cost Markup Rate Selling Price
$59.50 33% $

In: Accounting

Write a program to receive a string from the user and compares the first and second...

Write a program to receive a string from the user and compares the first and second half of the word and prints “First and Second Half Same” or “First and Second Half Different”. If the length of the word is odd, ignore the middle letter.

For example:

Run 1:

Enter a word: abcdabc

First and Second Half Same

Run 2:

Enter a word: abcde

First and Second Half Different

Hint: use the Math.floor() and length() to get the halves of the string and use the equals() to perform the similarity check inside if-else statement.

**********************************************************************************

Write a program that reads three different integers from the users and prints “all the same” if they are all equal, “all different”, if three numbers are different and “neither” for all other cases.

For example:

Enter first number: 3

Enter first number: 2

Enter first number: 6

All Different.

**********************************************************************************

Write a program that reads three different floating point numbers from the users and prints the largest of those three:

For example:

First number: 2.36

Second number: 2.99

Third number: 2.78

Largest: 2.99

In: Computer Science

Let f(x)=3x^3−7 A) List the critical point(s) of f= B)f′(x)>0f′(x)>0 for x∈= C)f′(x)<0f′(x)<0 for x∈= D)The...

Let f(x)=3x^3−7

A) List the critical point(s) of f=

B)f′(x)>0f′(x)>0 for x∈=

C)f′(x)<0f′(x)<0 for x∈=

D)The local maxima of ff occur at x=

E)=The local minima of ff occur at x=

nstructions:
For part (1), give your answer as a single value, or a list of values, or the word
none .
For parts (2) and (3), give your answer as an interval or a union of intervals, such as (0,1) or (-inf, 2) U (3,4), or the word none.
For parts (4) and (5), give your answer as a comma separated list of xx-values, or the word none.

Note: You can earn partial credit on this problem.

In: Math

John Thurgood founded a company that translates Chinese books into English. His company is currently testing...

  1. John Thurgood founded a company that translates Chinese books into English. His company is currently testing a computer-based translation service. Since Chinese symbols are difficult to translate, John assumes the computer program will make some errors, but then so do human translators. The computer error rate, as promised by the computer program developer, is no more than three errors per 400 words. Suppose John randomly selects a 1200-word passage. If 15 errors are found in the 1200-word passage, what would you conclude about the computer program developer’s claim? Why? (Assume that it is possible for the computer to make more than one error in translating each word in the passage).

How do I enter this into minitab?

In: Statistics and Probability

A researcher is studying memory for different types of words under low, and high memory load....

A researcher is studying memory for different types of words under low, and high memory load. She uses concrete words (e.g., dog, boat) and abstract words (e.g. love, height) in a factorial design, with five participants in each cell. With part of the information in the summary table, please finish the table and conduct the analysis.

Source

SS

df

MS

F

Between

2000

Word Type

750

Memory Load

125

Load*Type

Within Treatment

------------

Total

3500

------------

------------

a. Test and draw conclusions about the main effect of memory load.

b. Test and draw conclusions about the main effect of word type.                                 

c. Test and draw conclusions about the memory load x word type interaction

In: Statistics and Probability

Write a method ( C++ ) map occurance_map(const string path); that reads in an ascii text...

Write a method ( C++ )

map occurance_map(const string path);

that reads in an ascii text file and returns an assocation where each key is a word in the text file and each value is the number of occurances of that word. Ignore punctuation and numbers. The method should be case-insensitive and should store the keys as lowercase. A word is definited by an string consisting entirely of alpha-numeric characters or apostrophes (single quote characteris). For example, if the file contained

This is a sentence. Don't think of wier_d strings as words. Really, 123 is a nice number. 

you would include sentence, don't, and 123 but not ., ,, or wier_d. Using single quotes as quotes, as in

'I should use double quotes'

is a user error and will catch the "words"

'I
should
use
double
quotes'

In: Computer Science

Part (c): An implementation of division You are familiar with integer division operations. In some processors...

Part (c): An implementation of division

You are familiar with integer division operations. In some processors there is no

division instruction. One way to implement division is via repeated subtractions.

NB: This is integer division, NOT floating point division.

For example, consider the expression M / N where M = 370 and N = 120 . If we

repeatedly subtract until we have a value less than N , then the number of times we

do the subtraction is the result. Ie:

● 370 – 120 => 250 (subtraction #1)

● 250 – 120 => 130 (subtraction #2)

● 130 – 120 => 10 (subtraction #3)

When we have the result 10 , we have performed 3 subtractions. Therefore, 370 /

120 = 3

Your task for part (a) is to complete the code in division.asm that has been

provided for you. In that file there are some comments giving several simplifying

assumptions.

For example, the value M will always be a positive two’s-complement number; the

value N will always be a two’s complement positive number less than 128. For

greater certainty, N will never be 0 . Your code will not be tested with inputs that do

not meet these requirements.

Some test cases are provided to you.

# Compute M / N, where M must be in $8, N must be in $9,
# and M / N must be in $15.
# N will never be 0


.text
start:
        lw $8, testcase3_M
        lw $9, testcase3_N

# STUDENTS MAY MODIFY CODE BELOW
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
        
        nop
        addi $15, $0, -10

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# STUDENTS MAY MODIFY CODE ABOVE

exit:
        add $2, $0, 10
        syscall
                

.data

# testcase1: 370 / 120 = 3
#
testcase1_M:
        .word   370
testcase1_N:
        .word   120
        
# testcase2: 24156 / 77 = 313
#
testcase2_M:
        .word   24156
testcase2_N:
        .word   77
        
# testcase3: 33 / 120 = 0
#
testcase3_M:
        .word   33
testcase3_N:
        .word   120

In: Computer Science