answer.
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
Lilit [14]
1 year ago
9

Finish the program to compute how many gallons of paint are needed to cover the given square feet of walls. Assume 1 gallon can

cover 350.0 square feet. So gallons = the square feet divided by 350.0. If the input is 250.0, the output should be:
0.714285714286
Computers and Technology
1 answer:
Zepler [3.9K]1 year ago
4 0

Answer:

The program in Python is:

Area = float(input("Area: "))

print("Gallons: "+str(Area/350.0))

Explanation:

The requirement of the program is straightforward and what is required is to divide the inputted area by 350.

Hence, the explanation is as follows:

This line prompts user for Area

Area = float(input("Area: "))

This line calculates and prints the equivalent number of gallons

print("Gallons: "+str(Area/350.0))

You might be interested in
Which type of utp cable is used to connect a pc to a switch port?
rodikova [14]
HDMI Cable, i think that's what it's called.
3 0
2 years ago
A packet analyzer is a program that can enable a hacker to do all of the following EXCEPT ________. Select one: A. assume your i
bonufazy [111]

Answer:

Option (B) is the correct answer of this question.

Explanation:

Packet analyzer is a software application or set of infrastructure capable of unencrypted and recording communication that travels through a virtual system of a computer system.A packet analyzer used to detect network activity is recognized as a broadband monitoring system.

A packet analyzer is a code application that is used for monitoring, intercepting, and recording http requests with the help of a virtual interface.

Other options are incorrect because they are not related to the given scenario.

8 0
2 years ago
What will be displayed after code corresponding to the following pseudocode is run? Main Set OldPrice = 100 Set SalePrice = 70 C
Tatiana [17]

Answer:

A jacket that originally costs $ 100 is on sale today for $ 80                                    

Explanation:

Main : From here the execution of the program begins

Set OldPrice = 100  -> This line assigns 100 to the OldPrice variable

Set SalePrice = 70   -> This line assigns 70to the SalePrice variable

Call BigSale(OldPrice, SalePrice)  -> This line calls BigSale method by passing OldPrice and SalePrice to that method

Write "A jacket that originally costs $ ", OldPrice  -> This line prints/displays the line: "A jacket that originally costs $ " with the resultant value in OldPrice variable that is 100

Write "is on sale today for $ ", SalePrice  -> This line prints/displays the line: "is on sale today for $ " with the resultant value in SalePrice variable that is 80

End Program -> the main program ends

Subprogram BigSale(Cost, Sale As Ref)  -> this is a definition of BigSale method which has two parameters i.e. Cost and Sale. Note that the Sale is declared as reference type

Set Sale = Cost * .80  -> This line multiplies the value of Cost with 0.80 and assigns the result to Sale variable

Set Cost = Cost + 20  -> This line adds 20 to the value of Cost  and assigns the result to Cost variable

End Subprogram  -> the method ends

This is the example of call by reference. So when the method BigSale is called in Main by reference by passing argument SalePrice to it, then this call copies the reference of SalePrice argument into formal parameter Sale. Inside BigSale method the reference &Sale is used to access actual argument i.e. SalePrice which is used in BigSale(OldPrice, SalePrice) call. So any changes made to value of Sale will affect the value of SalePrice

So when the method BigSale is called two arguments are passed to it OldPrice argument and SalePrice is passed by reference.

The value of OldPrice is 100 and SalePrice is 70

Now when method BigSale is called, the reference &Sale is used to access actual argument SalePrice = 70

In the body of this method there are two statements:

Sale = Cost * .80;

Cost = Cost + 20;

So when these statement execute:

Sale = 100 * 0.80 = 80

Cost = 100 + 20 = 120

Any changes made to value of Sale will affect the value of SalePrice as it is passed by reference. So when the Write "A jacket that originally costs $ " + OldPrice Write "is on sale today for $ " + SalePrice statement executes, the value of OldPrice remains 100 same as it does not affect this passed argument, but SalePrice was passed by reference so the changes made to &Sale by statement in method BigSale i.e.  Sale = Cost * .80; has changed the value of SalePrice from 70 to 80 because Sale = 100 * 0.80 = 80. So the output produced is:

A jacket that originally costs $ 100 is on sale today for $ 80                              

7 0
1 year ago
Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
Usimov [2.4K]

I'm going to assume this is Java, because you said "method" meaning it will be some sort of object oriented language, and Java's really common. Here would be the full program, but you can just take the method out isolated if you need it.

package lastname;

public class LastName {

   public static void main(String[] args) {

       // Example usage:

       String name = LastName.lastName("Garrett Acord");

       System.out.println(name);

       // Output: Acord G.

   }

   public static String lastName(String fullName)

   {

       String[] splitName = fullName.split(" ");

       return String.format("%s %s.", splitName[1], splitName[0].substring(0,1) );

       

   }

   

}

7 0
2 years ago
A cyber criminal sends a series of maliciously formatted packets to the database server. The server cannot parse the packets and
telo118 [61]

Answer:

DoS attack

Explanation:

A Denial of Service attack involves the sending of maliciously formatted data packets to a server. The packet can be larger than the allowed IP size such that when it arrives at the server, the server cannot identify the headers in the data packet for it to process and extract data. The server can either freeze or crash, denying allowed users access to its resources and making it unavailable.

7 0
1 year ago
Other questions:
  • Write a loop that reads strings from standard input, where the string is either duck or goose. the loop terminates when goose is
    7·1 answer
  • Social networking sites like Office Online, PayPal, and Dropbox are used to develop social and business contacts.
    6·2 answers
  • there are four stage of the product life cycle. during which of these stages do you think is the best time for a company to purc
    10·2 answers
  • Select the correct answer. James is a sales analyst of a departmental store chain. He checked the sale records for the past 12 m
    6·2 answers
  • An organization has a datacenter manned 24 hours a day that processes highly sensitive information. The datacenter includes emai
    5·1 answer
  • Write a function string middle(string str) that returns a string containing the middle character in str if the length of str is
    13·1 answer
  • Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that
    14·1 answer
  • Pick a 3D game you enjoy or know about. Pick a scene from that game that has at least one character in it and describe the scene
    9·1 answer
  • Create two classes. The first, named Sale, holds data for a sales transaction. Its private data members include the day of the m
    8·1 answer
  • Television broadcasts were originally delivered by using which technology
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!