Okay for this question, I obviously don't need a quantity because I dont have any, but how would I approach this question in lab if asked:
"Quantify the scatter (or range) of the three resistance values as a percent of their averages"
I don't know what my answer should look like or what I'm supposed to do with the resistance values
In: Physics
Hello, Im trying to converter this C# program into python, i have started but am stuck on alot of small syntax! Please help me!
def Wired
def "RTClib.h"
int PWMSTEP = 2
int PWMSTART = 340
int PWMEND = 1023
int iENDPOINT
int correctionStep = 1
int correctionThreshold = 5
int fadeOutstep = 5
int numReadings = 5
float readings[numReadings]
int readIndex = 0
float total = 0
float average = 0
def SoftwareSerialmySerial = 7 8
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
def RED 0x1
def YELLOW 0x3
def GREEN 0x2
def TEAL 0x6
def BLUE 0x4
def VIOLET 0x5
def WHITE 0x7
int sensorPin = A1
int sensorPin2 = A2
int sensorValue = 0
int sensor2Value = 0
int isetPWM = 0
int usersetMaxFlow = 0
int usersetMinFlow = 0
int setFlow = 0
float fymin
bool DBUG = true
int rawflow = 0
int rawpressure = 0
def sflowrate
int flowrate = 0
int ipwm = 0
int oldipwm = 0
float flowdifference
int actualflowrate = 0
int actualpressure = 0
bool bnewGasIn
bool bovershoot = false
int imode
int led = LED_BUILTIN
int PWMPIN = 10
int PRESSUREPIN = A6
int RESET = 1
int SYSTEM_IDLE = 6
int GASIN = 2
int FADEIN = 13
int FADEOUT = 14
int RAWGASIN = 15
int STEP1 = 100
int STEP0 = 10
int STEP2 = 200
int STEP3 = 300
int STEP4 = 400
int STEP5 = 500
int MMIN = 16
int MMAX = 17
int MRUN = 18
int SYSTEM_STATE
int TEST_STATE
bool FLOW_MODE = true
float newpflow
def previousMillis = 0
int initialflowrate
def interval = 0
int hbcounter = 0
int buttonState = 0
def buf[20]
int incomingLen
int sblen
def c
bool bOkNum
float ymin
float ymax
float xmax
int pressureOffset
int targetpressure
int zeropressure
def startMillis
int address = 0
str flowDataStruct {
int deltaP[51]
int zeropressure;
}
int tdeltaP[51]
def DataStructflowData[3]
int itarget
int iindex
int ncages
void setup() {
int iret = EEPROM.readBlock(address, flowData,3)
def SYSTEM_STATE = SYSTEM_IDLE
def Timer1.initialize(1000); // msec so 2500=400Hz
def pinMode(PWMPIN, OUTPUT);
def Serial.begin(9600);
def mySerial.begin(9600);
for (int thisReading = 0; thisReading < numReadings;
thisReading++) {
readings[thisReading] = 0;
}
EEPROM.readBlock(address, flowData,3);
print "Prodigy Calibration"
}
void loop() {
if (Serial.available()) {
c = Serial.read();
print "incoming char: "
// println(c);
if (c==63)
{
print "Prodigy Calibration 001"
print "1,2,3 to start"
print "W to save to eeprom"
print "any char to abort"
} else
if ((c==87)||(c==119))
{
print "Calibration data"
print "one cage: zeroPressure=");
print flowData[0].zeropressure
print flowData[0].deltaP[0]);
for (int i=1;i<51;i++)
{
print ","
print flowData[0].deltaP[i]
}
print " "
print "two cages: zeroPressure="
print (flowData[1].zeropressure)
print (flowData[1].deltaP[0])
for (int i=0;i<51;i++)
{
print ","
print (flowData[1].deltaP[i])
}
print " "
print "three cages: zeroPressure="
Serial.println(flowData[2].zeropressure);
Serial.print( flowData[2].deltaP[0]);
for (int i=0;i<51;i++)
{
print ","
print flowData[2].deltaP[i]
print " "
int iret = EEPROM.writeBlock(address, flowData,3);
print "Saved."
} else
if (c == 49)
{
for (int i=0;i<51;i++)
{
def tdeltaP[i] = 0;
}
def itarget = 50;
def iindex = 0;
def iENDPOINT = 1000;
def ipwm = 0; //start pwm
def Timer1.pwm(PWMPIN, ipwm);
print "Starting one cage calibration."
def SYSTEM_STATE = GASIN;
def TEST_STATE = STEP0;
def ncages = 0;
zeropressure = analogRead(PRESSUREPIN);
flowData[ncages].zeropressure = zeropressure;
} else
if (c == 50)
{
for (int i=0;i<51;i++)
{
tdeltaP[i] = 0;
}
itarget = 50;
iindex = 0;
iENDPOINT = 650;
ipwm = 0; //start pwm
Timer1.pwm(PWMPIN, ipwm);
print "Starting two cage calibration."
SYSTEM_STATE = GASIN;
TEST_STATE = STEP0;
ncages = 1;
zeropressure = analogRead(PRESSUREPIN);
flowData[ncages].zeropressure = zeropressure;
} else
if (c == 51)
{
zeropressure = analogRead(PRESSUREPIN);
for (int i=0;i<51;i++)
{
tdeltaP[i] = 0;
}
itarget = 50;
iindex = 0;
iENDPOINT = 425;
ipwm = 0; //start pwm
Timer1.pwm(PWMPIN, ipwm);
print "Starting three cage calibration."
SYSTEM_STATE = GASIN;
TEST_STATE = STEP0;
ncages = 2;
zeropressure = analogRead(PRESSUREPIN);
flowData[ncages].zeropressure = zeropressure;
} else
{
print "Stopping."
SYSTEM_STATE = FADEOUT;
}
}
long currentMillis = millis();
long ltemp = (unsigned long) (currentMillis -
previousMillis);
float flowdifference = (float)setFlow - (newpflow*10.0);
float tp;
int itemp;
if (SYSTEM_STATE==FADEOUT)
{
while (1) {
if (ipwm < 250)
ipwm -= 10;
else
if (ipwm > 500)
ipwm -= fadeOutstep*2;
else
ipwm -= 10;
if (ipwm<=0)
{
ipwm=0;
Timer1.pwm(PWMPIN, ipwm); //10bit
SYSTEM_STATE=SYSTEM_IDLE;
break;
}
Timer1.pwm(PWMPIN, ipwm); //10bit
}
} else
if (SYSTEM_STATE==GASIN)
{
switch (TEST_STATE)
{
// set PWM
case STEP0:
tp = analogRead(PRESSUREPIN);
total = 0;
// tp = ((float)tp*(float)5.0)/(float)1023.0;
for (int thisReading = 0; thisReading < numReadings;
thisReading++) {
readings[thisReading] = tp;
total+=tp;
}
// itemp = (int)((total / numReadings)*1000.0);
itemp = (int)((total / numReadings));
print "Start initial p = "
print itemp
readIndex = 0;
startMillis = millis();
TEST_STATE = STEP1;
break;
// set zero offset
case STEP1:
tp = analogRead(PRESSUREPIN);
// tp = ((float)tp*(float)5.0)/(float)1023.0;
print "actualpressure="
print tp
total = total - readings[readIndex];
readings[readIndex] = tp;
total = total + readings[readIndex];
readIndex = readIndex + 1;
if (readIndex >= numReadings) {
readIndex = 0;
}
zeropressure = (int)((total / numReadings));
// zeropressure = (int)((total / numReadings)*1000.0);
print " p0="
print zeropressure
if (((unsigned long) (currentMillis - startMillis))>3000)
{
TEST_STATE = STEP2;
ipwm = PWMSTART;
Timer1.pwm(PWMPIN, ipwm); //10bit
startMillis = millis();
}
break;
// set PWM
case STEP2:
tp = analogRead(PRESSUREPIN);
// tp = ((float)tp*(float)5.0)/(float)1023.0;
total = total - readings[readIndex];
readings[readIndex] = tp;
total = total + readings[readIndex];
readIndex = readIndex + 1;
if (readIndex >= numReadings) {
readIndex = 0;
}
actualpressure = (int)((total / numReadings)*1000.0);
// actualpressure = (int)((tp)*1000.0);
actualpressure = (int)((tp));
if (((unsigned long) (currentMillis - startMillis))>7000)
//10000)
{
print "zp="
print zeropressure
print " pressure="
print ","
print actualpressure
print " pwm="
print ","
print ipwm
// tp = analogRead(A5);
// tp = ((float)tp*(float)5.0)/(float)1023.0;
//// Serial.print( " Fv=");
print ","
mySerial.write('F');
mySerial.write('\r');
delay(500);
incomingLen = mySerial.available();
if (incomingLen > 0) {
// Serial.println(" ");
print "newchar: incomingLen="
print incomingLen
print "-"
sblen=0;
bOkNum = false;
bool bcont = true;
for (int i=0;i<incomingLen;i++)
{
c = mySerial.read();
if (c==13)
{
bcont = false;
bOkNum = true;
buf[sblen++]=0;
// break;
} else
if (bcont)
{
buf[sblen++]=c;
print "-"
print c
}
}
// Serial.println("#");
if (bOkNum)
{
Str stemp = String((char *) buf);
tp = stemp.toFloat();
print " flow="
print tp
print "#"
} else tp = -1.00;
print tp
int itemp1 = (int)(tp*100.0);
if (itemp1 >= itarget)
{
print "target found: target="
print itarget
print " deltaP="
print actualpressure
tdeltaP[iindex++] = actualpressure;
if (itarget==iENDPOINT)
{
SYSTEM_STATE=FADEOUT;
print ""
print "Completed. Array is"
for (int i=0;i<51;i++)
{
flowData[ncages].deltaP[i]=tdeltaP[i];
print tdeltaP[i]
print ","
}
print " "
}
itarget+=25;
}
}
// if (((long) (currentMillis - startMillis))>1500)
// {
if (itarget>=600)
PWMSTEP=5;
else
PWMSTEP=2;
ipwm+=PWMSTEP;
if (ipwm > PWMEND){ //changed from 255 for 10bit
SYSTEM_STATE=FADEOUT;
print ""
print "Completed. Array is"
for (int i=0;i<51;i++)
{
flowData[ncages].deltaP[i]=tdeltaP[i];
print tdeltaP[i]
print ","
}
print " "
}
Timer1.pwm(PWMPIN, ipwm); //10bit
startMillis = millis();
}
break;
}
}
}
In: Computer Science
Problem 10-4A Sell or process LO A1
Harold Manufacturing produces denim clothing. This year, it produced 5,120 denim jackets at a manufacturing cost of $42.00 each. These jackets were damaged in the warehouse during storage. Management investigated the matter and identified three alternatives for these jackets.
Required:
1. Calculate the incremental income.
In: Accounting
For this discussion you will need to select a product, good, or service that you purchase on a regular basis. This could be anything from your morning coffee to the make of your car to your favorite chain restaurant. Conduct some formal research on the marketing strategy of the company or brand before you start your posts.
For Discussion
In: Operations Management
Required information Use the following information to answer questions [The following information applies to the questions displayed below.] The following information is available for Lock-Tite Company, which produces special-order security products and uses a job order costing system. April 30 May 31 Inventories Raw materials $ 45,000 $ 41,000 Work in process 9,200 19,700 Finished goods 61,000 33,900 Activities and information for May Raw materials purchases (paid with cash) 170,000 Factory payroll (paid with cash) 200,000 Factory overhead Indirect materials 17,000 Indirect labor 46,000 Other overhead costs 103,000 Sales (received in cash) 1,400,000 Predetermined overhead rate based on direct labor cost 55 % Exercise 15-7 Cost flows in a job order costing system LO P1, P2, P3, P4 Compute the following amounts for the month of May using T-accounts. Cost of direct materials used. Cost of direct labor used. Cost of goods manufactured. Cost of goods sold.* Gross profit. Overapplied or underapplied overhead. *Do not consider any underapplied or overapplied overhead.
In: Accounting
A beam of sound waves of a specific frequency and intensity is passed from one medium into another, arriving at the interface at an angle that is not perpendicular to the interface. Identify TWO aspects of this sound wave that will be different about this beam now that it is travelling in the second medium compared to when it was in the first medium. Explain your answer.
In: Physics
Calculate delta H (298) and delta S (298) for the following reactions? a) 2 TiO + 1/2 O2 = Ti2O3 b) 3 Ti2O3 + 1/2O2 = 2Ti3O5 c) Ti3O5 + 1/2O2 = 3TiO2
In: Chemistry
Homework Assignment #1 ECO 3203, Spring 2020
Instructions: Answer each of the following questions. Show your
work wherever possible, and justify your responses wherever
appropriate.
Due: Friday, January 31st at the beginning of class
1. What is meant by the “marginal product of labor”? What typically
happens to a firm’s marginal product of labor as it increases labor
employment, all else equal? Why is that? What typically happens to
a firm’s marginal product of labor as it increases capital
employment, all else equal? Why is that?
2. Consider the following production functions:
Y = AK1/2L1/2 Y = AK + 3L
a. Fixing total factor productivity (A) at 2 and labor employment
(L) at 16 units, what is the marginal product of capital when
capital employment (K) is 25, 35, and 45 for each production
function? Do these production functions exhibit diminishing returns
to capital employment? Explain. b. Are labor and capital
complements under these production functions? Explain. c. Is either
production function a “Cobb-Douglas” function? Explain.
3. Describe the difference between what the “nominal” wage rate and
the “real” wage rate measure. How is a nominal wage rate converted
into its real equivalent?
4. Consider a perfectly competitive, profit-maximizing firm facing
the following marginal product of labor function and prices:
MPL = 0.5A(K/L)1/2 W = 40 R = 60 P = 8 K = 4
a. What is the real wage rate paid by this firm?
b. If total factor productivity (A) is 20, how much labor (L) would
this firm want to employ? c. If the price of output (P) rises from
$8/unit to $10/unit, what will the new real wage rate be? All else
equal, how much labor would the firm want to employ at that wage
rate? d. Assuming that total factor productivity is 20, graph this
firm’s labor demand function (quantity of labor demanded graphed
against the real wage paid for labor) for values of the real wage
between 4 and 40. Be sure to plot at least 3 distinct points.
5. Describe the difference between the “endogenous” and the
“exogenous” variables of an economic model. In the classical model
of a closed economy (Mankiw, chapter 3), which variables are
endogenous and which are exogenous? List at least 4 variables in
each category.
6. Use the classical model of factor markets (Mankiw, chapter 3) to
predict how each of the following shocks should affect a nation’s
real wages (W/P) and real rental price of capital (R/P). Be sure in
each case to clearly state your predicted direction of change (up,
down, or no change) for both variables and to depict your
predictions with supply/demand diagrams for both the labor and
capital markets.
a. The supply of capital (KS) decreases b. Technological innovation
increases total factor productivity (A) c. Government purchases (G)
are increased
7. How do macroeconomists typically define the difference between
the “short run” and the “long run”? Is the classical model of a
closed economy (Mankiw, chapter 3) considered a short run model or
a long run model? Why?
8. Use the classical model of a closed economy to predict how each
of the following shocks should affect a nation’s real aggregate
income (Y), national saving (S), investment (I), and interest rate
(r). Be sure in each case to clearly state your predicted direction
of change (up, down, or no change) for all four variables and
illustrate your predictions for S, I and r with a supply/demand
diagram for the loanable funds market.
a. The supply of capital (KS) decreases b. Technological innovation
increases total factor productivity (A) c. Government purchases (G)
are increased d. Autonomous investment (i0) decreases
9. According to the classical model of a closed economy, what
determines the size of a nation’s real aggregate income? Based on
that theory, what kind of public policies could be used to increase
a nation’s income? Give at least two specific examples.
10. Consider the following model of a closed economy:
YS = AK1/2L1/2 Yd = C + I + G C = 300 + 0.70(Y – T) I =
2000 – 10,000r W/P = MPL R/P = MPK KS = 100 LS = 225 A =
30 G = 1,000 T = 1,500
a. What are the market-clearing values of the real wage (W/P) and
real rental price of capital (R/P) for this economy? b. Assuming
that both factor markets clear, labor market and capital market
clear, what will real aggregate income (Y) and national saving (S)
be for this economy? c. What must the real interest rate (r) be in
order to establish equilibrium in the market for loanable funds? d.
What would the new equilibrium values of W/P, R/P, Y, S and r be if
the capital supply (KS) increased from 100 to 144, all else equal?
e. What would the new equilibrium values of W/P, R/P, Y, S and r be
if taxes (T) decreased from 1,500 to 1000, all else equal? Assume
that KS = 100.
11. What is “autonomous consumption”? Describe two shocks that
would increase a nation’s autonomous consumption. According to the
classical model, how would national saving (S) and investment (I)
be affected (up, down, or no change) by those shocks? How would the
aggregate demand for goods (Yd) be affected (up, down, or no
change)? Explain.
12. What is “crowding out,” and why does it happen when government
purchases are increased? Would an exogenous increase in autonomous
consumption also cause crowding out? Explain.
13. Consider a nation with a marginal propensity to consume of
0.75.
a. What will its marginal propensity to save be? b. What would
happen to its consumption (give the direction and size of the
effect) if taxes (T) were to increase by 100, assuming that real
aggregate income is unaffected? What would happen to private
saving? To public saving? To national saving? c. Suppose, instead,
that government purchases (G) increase by 100 while taxes remain
unchanged. Assuming that aggregate income is unaffected, what would
happen to consumption? What would happen to private saving? To
public saving? To national saving?
14. Suppose you deposit $200 into a bank for 1 year. At the time of
your deposit, goods cost $2.50 apiece. A year later, you withdraw
your deposit with interest, which totals $215. At that time, the
price of goods has fallen to $2.40 apiece.
a. What was the “real” value of your $200 at the time of your
deposit? b. What nominal interest rate did your bank pay you for
your deposit? c. What was the rate of inflation over the year that
your money was sitting in the bank? d. What real interest rate did
you earn on your deposit?
In: Economics
Write a program that will find the smallest, largest, and average values in a collection of N numbers. Get the value N before scanning each value in the collection of N numbers. b. Modify your program to compute and display both the range of values in the data collection and the standard deviation of the data collections. To compute the standard deviation, accumulate the sum of the squares of the data values (sum squares) in the main loop. After the loop exits, use the formula: Standard Deviation = qsum sqaures N − average2 Use a for or while loop, and scan for each number entered separately. sample run 1 Program Computes Average, Maximum, Minimum,and Standard Deviation of N numbers Enter N: 5 Number 1: 19.3 Number 2: 16.5 Number 3: 11.9 Number 4: 22.3 Number 5: 18.4 Average = 17.680 Maximum = 22.300 Minimum = 11.900 StanDev =3.443 (IN C WITH COMMENTS)
In: Computer Science
I have a question that I would like to ask here since I'm not an expert or any near to that. Actually I just came up with this question when I was watching The fabric of cosmos. I couldn't find where I can ask this kind of question. So hopefully this is the right place.
What is the "background" of multiverse?
Let me elaborate a little more what that means clearly. As far as I understand, multiverse is a cluster of many universe and it seems like (well from what I saw in documentary) that bubbles in a cup of soda.
What I am curious is that then what is the mechanism of the background or surrounding, I should say, of the multiverse? Since if multiverse "exists" somewhere, then that means the surrounding has to have some kind of characteristics, such as space-time.
I hope that I explained comprehensibly, and somebody can give some reasonable explanation. Even better, any book recommendation would be appreciated!
Even though I studied physics for 1 year and half, I forgot many of them except curiosity. ;)
In: Physics
Ques: (i) Given an instance of a relation R where A and B are two of the attributes in R, describe an algorithm that checks whether a functional dependency A → B holds on R.
(ii) Given a relation with schema R(A, B, C, D, E) and a set of FD's F = {AD → E, AB → C, C → D, E → B} Find a lossless join decomposition to decompose R into collections of relations that are in BCNF
In: Computer Science
i) Show that there is no algorithm for deciding if any two
Turing machines M1 and M2 accept the same language.
ii) How is the conclusion of ii affected if M2 is a finite
automaton?
In: Computer Science
The equilibrium constant for the intercoversion of PCl5 and PCl3 is 0.0121:
PCl5(g) = PCl3(g) + Cl2(g)
A vessel is charged with PCl5, giving an initial pressure of 0.123 atm. At equilibrium, the partial pressure of PCl3 is __________ atm.
In: Chemistry
2. The atmospheric pressure at the sea level is greater than the atmospheric pressure at the mountain top (T,F)
In: Physics
So, I am conducting a research project and I have many categorical variables that I am trying to run crosstab and chi-square tests on. The only issue is that I only recieved 81 respondents so a lot of my questions have less than 5 people who selected one answer over another. I am unsure what to do. Do I state in my discussion section that due to there being a lack of respondents that I could not test for significance on many of my variables? Or, is there another test that I can run that I am not thinking of?
In: Math