1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natasha_Volkova [10]
3 years ago
5

The shipping charges per 500 miles are not prorated. For example, if a 2-pound package is shipped 550 miles, the charges would b

e $2.20. Write a program that asks the user to enter the weight of a package and then displays the shipping charges.
Computers and Technology
1 answer:
Sedbober [7]3 years ago
4 0

Answer:

The solution code is written in Python:

  1. COST_PER_500MI = 1.1
  2. weight = float(input("Enter weight of package: "))
  3. total_cost = weight * COST_PER_500MI
  4. print("The shipping charges is $" + str(round(total_cost,2)))

Explanation:

Based on the information given in the question, we presume the cost per 500 miles is $1.10 per pound ($2.20 / 2 pound).

Create a variable COST_PER_500MI to hold the value of cost per 500 miles (Line 1). Next, prompt user input the weight and assign it to variable weight (Line 3). Calculate the shipping charge and display it using print function (Line 4-5).

You might be interested in
C - Language Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. E
Jobisdone [24]

Answer:

Replace

/* Your solution goes here */

with

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

Explanation:

The question requires that the first three elements of array runTimes be printed;

The first three elements are the elements at the first, second and third positions.

It should be noted the index of an array starts at 0;

  • So, the first element has 0 as its index
  • The second has 1 as its index
  • The third has 2 as its index

So, to make reference to the first three elements, we make use of

<em>runTimes[0], runTimes[1] and runTimes[2]</em> respectively

Having mention the above;

It should also be noted that array is of type integers;

So, to display integers in C, we make use of "%d";

Hence, the print statement for the first three elements is

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

8 0
2 years ago
A technician is configuring a new SOHO multifunction wireless router at a customer's location to provide network access to sever
Alja [10]

Answer:

B. Change the router's default administrative password.

Explanation:

Whenever a user purchase a router for wireless network, a default password has been set for the device, which can be easily accessible to different users on the internet or that particular network. This will  lead to unsecured that particular user in terms of hacking or stealing data or personnel information easily.

To make sure the security of customer on private network, the technician should change the router default password.  

7 0
2 years ago
Determine whether or not the following pairs of predicates are unifiable. If they are, give the most-general unifier and show th
Evgen [1.6K]

Answer:

a) P(B,A,B), P(x,y,z)

=> P(B,A,B) , P(B,A,B}  

Hence, most general unifier = {x/B , y/A , z/B }.

b. P(x,x), Q(A,A)  

No mgu exists for this expression as any substitution will not make P(x,x), Q(A, A) equal as one function is of P and the other is of Q.

c. Older(Father(y),y), Older(Father(x),John)

Thus , mgu ={ y/x , x/John }.

d) Q(G(y,z),G(z,y)), Q(G(x,x),G(A,B))

=> Q(G(x,x),G(x,x)), Q(G(x,x),G(A,B))  

This is not unifiable as x cannot be bound for both A and B.

e) P(f(x), x, g(x)), P(f(y), A, z)    

=> P(f(A), A, g(A)), P(f(A), A, g(A))  

Thus , mgu = {x/y, z/y , y/A }.

Explanation:  

Unification: Any substitution that makes two expressions equal is called a unifier.  

a) P(B,A,B), P(x,y,z)  

Use { x/B}  

=> P(B,A,B) , P(B,y,z)  

Now use {y/A}  

=> P(B,A,B) , P(B,A,z)  

Now, use {z/B}  

=> P(B,A,B) , P(B,A,B}  

Hence, most general unifier = {x/B , y/A , z/B }  

b. P(x,x), Q(A,A)  

No mgu exists for this expression as any substitution will not make P(x,x), Q(A, A) equal as one function is of P and the other is of Q  

c. Older(Father(y),y), Older(Father(x),John)  

Use {y/x}  

=> Older(Father(x),x), Older(Father(x),John)  

Now use { x/John }  

=> Older(Father(John), John), Older(Father(John), John)  

Thus , mgu ={ y/x , x/John }  

d) Q(G(y,z),G(z,y)), Q(G(x,x),G(A,B))  

Use { y/x }  

=> Q(G(x,z),G(z,x)), Q(G(x,x),G(A,B))

Use {z/x}  

=> Q(G(x,x),G(x,x)), Q(G(x,x),G(A,B))  

This is not unifiable as x cannot be bound for both A and B  

e) P(f(x), x, g(x)), P(f(y), A, z)  

Use {x/y}  

=> P(f(y), y, g(y)), P(f(y), A, z)  

Now use {z/g(y)}  

P(f(y), y, g(y)), P(f(y), A, g(y))  

Now use {y/A}  

=> P(f(A), A, g(A)), P(f(A), A, g(A))  

Thus , mgu = {x/y, z/y , y/A }.

7 0
3 years ago
I know that this will be taken down for not being a real question but is anyone else not able to search for anything? I can type
Schach [20]

Answer:

Sameee

Explanation:

6 0
2 years ago
Use the distributive property to expand the following expression. (9m - 6)7
Nady [450]
(9m - 6)7
(9m × 7) - (6 × 7)
63m - 42
7 0
3 years ago
Read 2 more answers
Other questions:
  • Consider a file system that uses inodes to represent files. Disk blocks are 2KB in size and a pointer to a disk block requires 4
    13·1 answer
  • If there is no index.html file in the root folder nothing will be displayed when you navigate to the site address
    14·1 answer
  • The tone a writer takes is referred to as the writing _____.
    7·2 answers
  • c++ design a class named myinteger which models integers. interesting properties of the value can be determined. include these m
    14·1 answer
  • After a robbery, what is the purpose of conducting a neighborhood canvass?
    9·1 answer
  • This type of technology does not come with a keyboard or mouse for input
    11·2 answers
  • Illia is a network administrator at a company.which tasks is she responsible for
    9·1 answer
  • What are 3 important reasons to reconcile bank and credit card accounts at set dates?
    15·1 answer
  • 2. The factorial of a positive integer n is the product of the integers from 1 to n. You can express the factorial of a positive
    6·1 answer
  • David is preparing a report to show the percentage increase in population in the United States in the last five years. Which fea
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!