# 1.14 LAB: Warm up: Basic output with variables

This zyLab activity prepares a student for a full programming assignment. Warm up exercises are typically simpler and worth fewer points than a full programming assignment, and are well-suited for an in-person scheduled lab meeting or as self-practice.

A variable like userNum can store a value like an integer. Extend the given program as indicated.

1. Output the user's input. (2 pts)

2. Output the input squared and cubed. Hint: Compute squared as userNum * userNum. (2 pts)

3. Get a second user input into userNum2, and output the sum and product. (1 pt)

Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs.

$Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! Enter another integer: 5 4 + 5 is 9 4 * 5 is 20$

#### Similar Solved Questions

##### The boiling points of pure HF, HCl, HBr and HI are -20, -85, -66 and -34...
The boiling points of pure HF, HCl, HBr and HI are -20, -85, -66 and -34 C, respectively. Identify the trends in bond polarity and dispersion forces along this series. (i) Use this information to assess the relative strengths of these two effects in this case. (3 marks) Suggest a reason for the anom...
##### Using the formula and you are supposed to get . Please show your steps for the...
Using the formula and you are supposed to get . Please show your steps for the double integration - I can do the rest 2. Find the vibrations of a rectangular membrane of sides a = 4 ft and b = 2 ft (Fig. 305) if the tension is 12.5 lb/ft, the density is 2.5 slugs/ft (as for light rubber), the init...
##### Esign an npn-based Inverting Amplifier with "diode-connected" (gate-to drain) n-channel MOSFET load to meet these performance...
esign an npn-based Inverting Amplifier with "diode-connected" (gate-to drain) n-channel MOSFET load to meet these performance specifications 200 Hz &fai 220 kHz Complete signal path mid-band gain Ami 20 dB Linear Vout Swing 21 Vp BJT (npr) → designer's choice, but the 2N3904 is ...
##### Charges A, B, and are arrayed along the y axis, with QA = -3,90 nC, 93.00...
Charges A, B, and are arrayed along the y axis, with QA = -3,90 nC, 93.00 nC, and c = 4.90 nC (see figure below). The distance between charges A and B is 71 - 1.00 m, and the distance between charges B and C is y2 = 2.60 m. 9A Vi 98 4c (a) What is the net electrostatic force on charge A? magnitude d...
##### 13. Apply the polygon nele to cyclobuta-1,3-dione. Make sur to include our applicable labels T a...
13. Apply the polygon nele to cyclobuta-1,3-dione. Make sur to include our applicable labels T a nt bonding interaction 127 Anon bonding line a) which molecular orbital is hignast in energy term degenerare mean with regard to mehaks b.) what does Ovitals C) what Rule states that electrons fill degen...
##### Over years, a virus-infected cell slowly transformed into a cancerous cell exposing (due to mutations) changed...
Over years, a virus-infected cell slowly transformed into a cancerous cell exposing (due to mutations) changed antigens, i.e. proteins, on its cell surface. Which of the following cells of the immune system are most likely to recognize and attack this transformed cell?      ...
##### QUESTION 4 The graphic symbol that can represent an operation or process is Rectangle (LO1) C...
QUESTION 4 The graphic symbol that can represent an operation or process is Rectangle (LO1) C Diamond Circle Parallelogram OOO...
##### The figure shows a circuit containing three switches, labeled S1, S2, and S3. Find the current...
The figure shows a circuit containing three switches, labeled S1, S2, and S3. Find the current at "a" for all possible combinations of switch settings. Put e = 90 V, R1 = 20 Ohm, and R2 = 10 Ohm. Assume that the battery has no resistance. a. Current at "a" for S1 and S3 closed, S2 op...
##### Double-Slit Experiment In a double-slit experiment, the second-order bright fringe is observed at an angle of...
Double-Slit Experiment In a double-slit experiment, the second-order bright fringe is observed at an angle of 0.60°. If the slit separation is 0.10 mm, then what is the wavelength of the light? Submit Answer Tries 0/12...
##### 2.   20% - Is Russia a suitable home market for TCL? How does it compare with...
2.   20% - Is Russia a suitable home market for TCL? How does it compare with other emerging market options?...
##### Model A, shown on the following graph, refers to the regression of hours spent surfing the...
Model A, shown on the following graph, refers to the regression of hours spent surfing the web and productivity at work. MODEL A RESIDUALS CO -1 -2 -3 0 10 20 3040 50 60 We were unable to transcribe this image...