1. What is the output of this program? 1 n 15 2 score 105 3 sum...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. What is the output of this program? 1 n 15 2 score 105 3 sum 150 4 sum + score 5n5 6 sum -2 7 nn/10 8 n-15 9 total n score +sum; 10 print() 11 print (n,\" ', score, ' ', total) 2. What is the output of the following program? 1 LIMIT - 5 2 sum 0 3 print ('', '\t', 'sum') 4 print (- " 5 for i in range (LIMIT +1): 6 7 sum +float (j)/2** (i+1) print ('\t', format (sum, .31')) 8 print () 9 print('sum format (sum, .3')) 3. What is the output of the following program? 1 cost - 8000 2 INCREASE PER YEAR - .06 3 print (Year\t Semester Cost)') 4 print (- 5 6 for year in range (5): 6749 -") cost + cost INCREASE_PER YEAR print ((year + 1), '\t', 'S', \ format (cost, '.2f')) 1/4. What is the output of this program? 1 char 2 space t 3 for kin range (5): 4 5 6 7 if k -- 4: print ((k+2) char) else: print (char k space char) Your answer: 1. What is the output of this program? 1 n 15 2 score 105 3 sum 150 4 sum + score 5n5 6 sum -2 7 nn/10 8 n-15 9 total n score +sum; 10 print() 11 print (n,\" ', score, ' ', total) 2. What is the output of the following program? 1 LIMIT - 5 2 sum 0 3 print ('', '\t', 'sum') 4 print (- " 5 for i in range (LIMIT +1): 6 7 sum +float (j)/2** (i+1) print ('\t', format (sum, .31')) 8 print () 9 print('sum format (sum, .3')) 3. What is the output of the following program? 1 cost - 8000 2 INCREASE PER YEAR - .06 3 print (Year\t Semester Cost)') 4 print (- 5 6 for year in range (5): 6749 -") cost + cost INCREASE_PER YEAR print ((year + 1), '\t', 'S', \ format (cost, '.2f')) 1/4. What is the output of this program? 1 char 2 space t 3 for kin range (5): 4 5 6 7 if k -- 4: print ((k+2) char) else: print (char k space char) Your answer:
Expert Answer:
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
Consider the rigid aircraft in planar flight indicated below with points P and R separated by distance L. Known measurement data includes components of translational velocity and acceleration vectors...
-
The trial balance of the Federal Antiquities Administration, as of August 31, 2017, follows: Required Prepare a statement of budgetary resources for the 11 months ended August 31, 2017, assuming that...
-
Schoenfeld, Bredow, and Huston (2012) had couples who were married complete a rating scale indicating their feelings of love for their partners-that is, "the extent to which [they] felt a sense of...
-
All possible outcomes of a random variable a. Correlation functions in an experiment b. Nonstationary process c. Sample space of \(x(t)\) at times \(t_{1}, t_{2}, \ldots\) d. White noise of the time...
-
The trial balance of Mr. Eko Fashion Center contained the following accounts at November 30, the end of the company?s fiscal year. Adjustment data:1. Supplies on hand totaled $2,000.2. Depreciation...
-
Are the actions of the TheDarkOverlord Solutions in this case (hacking into the schools district's servers and stealing data, sending threatening e-mails to students and parents, and demanding money...
-
You are the owner of a small business that manages the program, food, and merchandise sales at the Excel Center, where the local professional basketball team plays. In addition to basketball games,...
-
In Young's experiment, two coherent sources are placed 0.90 mm apart and fringe are observed one metre away. If it produces second dark fringe at a distance of 1 mm from central fringe, the...
-
A solid 0.5350 kg ball rolls without slipping down a track toward a vertical loop of radius R = 0.7550 m. What minimum translational speed Umin must the ball have when it is a height H = 1.162 m...
-
5. A model airplane with a mass of 0.311 kg pulls out of a dive. The bottom of the dive is a circular arc with a radius of 24.6 m. At the bottom of the arc, the plane's speed is a constant 22.7 m/s....
-
Ted Jackson is walking down Main Street with his son Hank when they are both hit by Sue's car at the crosswalk. Ted spends three months in the hospital recovering. Hank is in the hospital for two...
-
A 72 kg rock climber is attached to a rope that is allowing him to hang horizontally with his feet against the wall. The tension in the rope is 8.1 x 102 N, and the rope makes an angle of 30 with the...
-
2. Two students push horizontally on a large, 75 kg trunk. The trunk moves east with an acceleration of 3.0 m/s. One student pushes with a force of 2.4 x 102 N [E 45 S]. The force of friction acting...
-
The sketch shows two snapshots of a transverse wave on a string at time t1=0 and t2=0.10 s. If the wave can be written as u(x,t)=Acos(t+kx +0), find (a) amplitude A, (b) angular frequency , (c) wave...
-
4. Jobe dy -Y 2 et by
-
Consider the process flow diagram shown in Fig. 2.14. We can write this out as the system of equations The first four equations are the mass balances; the next eight equations are the process...
-
Consider the system of equations (a) Is the steady state at (y 1 = 0, y 2 = 0) stable, unstable, or neutrally stable? (b) Solve this system corresponding to the initial conditions y 1 (0) = 0 and y 2...
-
Consider the force balance for a damped harmonic oscillator with mass m = 1 kg, a spring constant k > 0 in N/m, and a friction coefficient > 0 in kg/s, subject to some initial position x 0 and...
-
What is the pressure drop associated with water at \(27^{\circ} \mathrm{C}\) flowing with a mean velocity of \(0.1 \mathrm{~m} / \mathrm{s}\) through an \(800-\mathrm{m}-\) long cast iron pipe of...
-
Fully developed conditions are known to exist for water flowing through a \(50-\mathrm{mm}\)-diameter tube at \(0.02 \mathrm{~kg} / \mathrm{s}\) and \(27^{\circ} \mathrm{C}\). What is the maximum...
-
Water at \(35^{\circ} \mathrm{C}\) is pumped through a horizontal, \(200-\mathrm{m}\)-long, \(30-\mathrm{mm}\)-diameter tube at \(0.25 \mathrm{~kg} / \mathrm{s}\). Over time, a 2-mm-thick layer of...
Study smarter with the SolutionInn App