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
ad-work [718]
3 years ago
7

Define a function compute gas volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use the

gas equation PV nRT, where P is pressure in Pascals, V is volume in cubic meters, n is number of moles, R is the gas constant 8.3144621 (J/ (mol*K), and T is temperature in Kelvin. 1 gas.const -8.3144621 23 Your solution goes here 45 gas pressure 108.0 6 gas moles 1.0 7 gas .temperature-273. 8 gasvolume-.0 910 gasvolume compute.gasvolumeCgas pressure, gastemperature, gas moles) 11 printC' Gas volume:",gas volume, 'mA3)
Computers and Technology
2 answers:
Bogdan [553]3 years ago
6 0

Answer:

Explanation:

import java.util.Scanner;

public class GasVolume {

final static double GAS_CONST = 8.3144621;

public static double computeGasVolume(double pressure,double temperature, double moles)

{

return moles*GAS_CONST*temperature/pressure;

}

public static void main(String[] args) {

Scanner scnr = new Scanner(System.in);

double gasPressure = 0.0;

double gasMoles = 0.0;

double gasTemperature = 0.0;

double gasVolume = 0.0;

gasPressure = 100;

gasMoles = 1 ;

gasTemperature = 273;

gasVolume = computeGasVolume(gasPressure, gasTemperature, gasMoles);

System.out.println("Gas volume: " + gasVolume + " m^3");

return;

}

}

timama [110]3 years ago
4 0

Answer:

in python:

def gas_volume(pressure, temperature, moles)-> 'm^3':

   volume = (moles * 8.314462123 * temperature)/ pressure

   return volumn

Explanation:

The python program defines the function "gas_volume" that computes the volume of a gas when the gas pressure, number of moles, and the temperature is given. The result (which is the volume) is mapped to the documentation 'm^3' which is the unit of volume.

You might be interested in
In the code snippet below, pick which instructions will have pipeline bubbles between them due to hazards.
denpristay [2]

Answer:

b. lw $t4, 4($t0)

c. add $t3, $t5, $t4

Explanation:

Pipeline hazard prevents other instruction from execution while one instruction is already in process. There is pipeline bubbles through which there is break in the structural hazard which preclude data. It helps to stop fetching any new instruction during clock cycle.

7 0
2 years ago
If a user's input string matches a known text message abbreviation, output the unabbreviated form, else output: Unknown. Support
Molodets [167]

Answer:

Here is the JAVA program. I  have added a few more abbreviations apart from LOL and IDK.

import java.util.Scanner; // to take input from user

public class MessageAbbreviation {

public static void main(String[] args) { //start of main() function body

   Scanner input = new Scanner(System.in); // create object of Scanner

       String abbreviation= ""; //stores the text message abbreviation

/* In the following lines the abbreviation string type variables contain the un-abbreviated forms */

           String LOL = "laughing out loud";

           String IDK = "i don't know";

           String BFF = "best friends forever";

           String IMHO = "in my humble opinion";

           String TMI = "too much information";

           String TYT = "take your time";

           String IDC = "I don't care";

           String FYI = "for your information";

           String BTW = "by the way";

           String OMG = "oh my God";

//prompts the user to enter an abbreviation for example LOL

           System.out.println("Input an abbreviation:" + " ");

           if(input.hasNext()) { // reads the abbreviation form the user

           abbreviation= input.next(); }

// scans and reads the abbreviation from user in the abbreviation variable

/*switch statement checks the input abbreviation with the cases and prints the un abbreviated form in output accordingly. */

    switch(abbreviation) {

       case "LOL" : System.out.println(LOL);

                    break;

       case "IDK" : System.out.println(IDK);

                    break;

       case "BFF" : System.out.println(BFF);

                    break;

       case "IMHO": System.out.println(IMHO);

                     break;

       case "TMI": System.out.println(TMI);

                     break;

       case "TYT": System.out.println(TYT);

                     break;

       case "IDC": System.out.println(IDC);

                     break;

       case "FYI": System.out.println(FYI);

                     break;

       case "BTW": System.out.println(BTW);

                     break;

       case "OMG": System.out.println(OMG);

                     break;

                     

       default    : System.out.println("Unknown"); } } }

Explanation:

The program first prompts the user to enter an abbreviation. Lets say the user enters LOL. Now the switch statement has some cases which are the conditions that are checked against the input abbreviation. For example if the user enters LOL then the following statement is executed:

case "LOL" : System.out.println(LOL);

This means if the case is LOL then the message ( un abbreviated form) stored in the LOL variable is displayed on output screen So the output is laughing out loud.

Anything else entered other than the given abbreviations will display the message: Unknown

The output is attached as screen shot.

5 0
3 years ago
Read 2 more answers
3.3 Code Practice: Question 1
Bezzdna [24]

Answer:

day=int(input(“Enter today’s day numerically: ”))

if(day ==15 or day ==30):

print(“It’s payday!”)

if(day !=15 and day !=30):

print(“Sorry, not a payday.”)

Explanation:Good luck!

6 0
3 years ago
To copy the formatting of selected text to another place in the document use _____.
ANEK [815]
To copy the formatting of selected text to another place in the document use the paintbrush AKA. Format painter
7 0
3 years ago
The next step in the translation of this mrna will be the formation of a peptide bond between which two of the numbered amino ac
blondinia [14]

The bond between Amino acid 2 and amino acid 3 two of the numbered amino acids. The correct option is A.

<h3>What is protein translation?</h3>

In genomics, translation is the process by which information encoded in messenger RNA (mRNA) directs the addition of amino acids during protein synthesis.

It is divided into three stages: initiation, elongation, and termination. After being processed, the mRNA transports the instructions to a ribosome in the cytoplasm.

The ribosome, which is made up of rRNA and proteins, is where translation takes place.

The bond formed by amino acids 2 and 3 (two of the numbered amino acids).

Thus, the correct option is A.

For more details regarding protein translation, visit:

brainly.com/question/16305501

#SPJ1

Your question seems incomplete, the missing part of question is attached below:

4 0
1 year ago
Other questions:
  • What is the difference between First Person Shooters and Construction Simulations?
    12·2 answers
  • The analog signals that carry analog or digital data comprise composites built from combinations of simple sine waves.
    12·1 answer
  • What do you remember about the difference between Canadian and US dollar (which one is greater)? Also, explain which online tool
    6·1 answer
  • Systems such as smartphones, appliances, game controllers, cable set-top boxes and automobiles that contain small computers are
    5·1 answer
  • The space force enhancement function concerned with providing data on meteorological, oceanographic, and space environmental fac
    12·1 answer
  • You have just connected a new computer to your network. The network user static IP addressing. You find that the computer can co
    12·2 answers
  • What can your employer do to protect you from overhead power lines?
    13·1 answer
  • The add_prices function returns the total price of all of the groceries in the dictionary. Fill in the blanks to complete this f
    15·1 answer
  • NAT addresses concerns over the dwindling IPv4 address space by ___________________. 1 point allowing networks to use fewer IP a
    15·1 answer
  • Which cloud technology characteristic ensures that a cloud customer can make changes to her cloud database from her smartphone w
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!