subject
Computers and Technology, 11.03.2020 05:59 kaidee

#In chemistry, the ideal gas law states:
#
# pressure * volume = # of moles * gas constant * temperature
#
#This is usually abbreviated to:
#
# PV = nRT
#
#We can solve this for any of these five variables, but let's
#solve it for Pressure. In terms of Pressure, the ideal gas
#law states:
#
# P = (nRT) / V
#
#Write a function called find_pressure that takes as input
#three variables: number of moles, temperature, and volume.
#You can call these variables in the function whatever you
#want, but they must be specified in that order: moles, then
#temperature, then volume. You should assume all three are
#floats. Then, return as output your calculation for
#pressure. For the gas constant, you should use the value
#0.082057.
#
#Hint: Python's rounding errors can change based on the
#order of the multipliers. If you're having difficulty with
#your answer being off by tiny fractions, change the order
#of the numbers to match the order in the formula above.

#Write your function here!
def find_pressure(n, T, V, test_R):
#R = 62.364/760
pressure = (n*T*test_R)/V
return pressure

#Below are some lines of code that will test your function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: "Result: 48.905972000000006". The extra zeroes and
#the 6 are rounding errors by Python.
test_n = 10
test_T = 298
test_V = 5
test_R = 62.364 #Torr!
print("Result:", find_pressure(test_n, test_T, test_V, test_R))

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:20
Which of these is a benefit of social networking? oa. hiding your true identity from friendsob. avoiding talking to people in personoc. spending time with friends instead of studyingod. connecting with new people
Answers: 2
question
Computers and Technology, 22.06.2019 14:40
You are working with a professional edition organization. they wish to install the expense tracker which requires the use of 4 custom tabs, 3 custom objects, and one custom app. if the company is already using 4 applications, 36 custom objects, and 7 custom tabs, what will happen when they try to install expense tracker?
Answers: 1
question
Computers and Technology, 22.06.2019 20:40
Assume that there is a 4% rate of disk drive failure in a year. a. if all your computer data is stored on a hard disk drive with a copy stored on a second hard disk drive, what is the probability that during a year, you can avoid catastrophe with at least one working drive? b. if copies of all your computer data are stored on three independent hard disk drives, what is the probability that during a year, you can avoid catastrophe with at least one working drive?
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
You know the right answer?
#In chemistry, the ideal gas law states:
#
# pressure * volume = # of moles * gas cons...
Questions
question
Social Studies, 13.02.2021 02:50
question
Mathematics, 13.02.2021 02:50
question
History, 13.02.2021 02:50
question
Mathematics, 13.02.2021 02:50
question
Mathematics, 13.02.2021 02:50
question
Social Studies, 13.02.2021 02:50
Questions on the website: 13722363