Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

initial initial- test_fn/d_dx_test_fn #print \"Here \" + str(depth) + \" initial

ID: 3699138 • Letter: I

Question

initial initial- test_fn/d_dx_test_fn #print "Here " + str(depth) + " initial is " + str(initial) 2862, in run_code exec(code obj, self.user_global_ns, self.user_ns) test _fn van_Der Waals fn(initial) d_dx_test_fnd_dV_van_Der Waals_fn(initial) depthE 1 return NewtonRaphson(initial, test fn, d_dx_test_fn, depth, eps, depth_limit) File "" line 1, in runfile'/Users/jerusalenwogayehu untitled28. py", wdir-'/Users/ jerusalemwogayehu) def printReport(guessi, guess2): global substance, p, T, a, b, R print "Critical Temperature (K) for s: fnn"s(substance, criticalTenprature)) "Critical Pressure (atm) for %s: 4f "4( substance, "Given Temperature (K): "4(T) "Given Pressure (atm): fn"(p) File "/Users/jerusalemwogayehu/ anaconda3/lib/python3.6/site-packages/ spyder/utils/site/sitecustomize.py, line 710, in runfile criticalPres sure()) vall NewtonRaphson guess1, van_Der_Waals_fn(guess1), d_dV_van_Der_Waals fn guess1), ) execfile filenane, namespace) #print (vall) val2 NewtonRaphson guess2, van_Der_Waals_fn(guess2), d_dV_van_Der_Waals fn guess2), ) File "/Users/jerusalemwogayehu/ anaconda3/lib/python3.6/site-packages/ spyder/utils/site/sitecustomize.py,Line 101, in execfile #print (val2) print "85 líquid phase molar volume at the given p and T: Af Iterations to convergence: %d "%(substance, val1[0], vall [1])- "85 liquid phase molar volume at the given p and T: ?f Iterations to convergence : "$( substance, val2[0], val2(11) print "n # Example in" exec compile(f.read, filename, exec'), namespace) substance"OXYGEN R-0.082057 #gas constant: Liter atm/mol K a-1.364 #van der Waals parameter : liters*2 atm / mol*2 b-0.0319 #van der Waals parameter: liter / mol File "/Users/jerusalemwogayehu/ untitled20.py", line 64 (K) for print "Critical Temperature %f "s( substance, 85: P-10.8 #Problem specified pressure (atm) T-125.0 #Problem specified temperature (K) criticalTemprature()) SyntaxError: invalid syntax In [11]: In [11]: printReport (e,1.2) ! #Van der Waals problem for nitrious oxide substance"METHANE" R-0.082057 #gas constant: Liter atm/mol K a-2.273 #van der Iaals parameter: liters*2 atm / mol*2 b-8.0431 #van der Waals parameter: liter / mol sp-10.8 #Problem specified pressure (atm)

Explanation / Answer

Try printing using below options:

print "Critical Temperature (K) for {}{} ".format(substance,criticalTemperature())

print "Critical Temperature (K) for {0}{1} ".format(substance,criticalTemperature())