Write an if-else statement that assigns 20 to the variable y if the variable x is greater
Question:
Write an if-else statement that assigns 20 to the variable y if the variable x is greater than 100. Otherwise, it should assign 0 to the variable y.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 77% (9 reviews)
Sample Output 1 0 Sample Output 2 2...View the full answer
Answered By
Abigael martinez
I have been a tutor for over 3 years and have had the opportunity to work with students of all ages and backgrounds. I have a strong belief that all students have the ability to learn and succeed if given the right tools and support. I am patient and adaptable, and I take the time to get to know each student's individual learning style in order to best support their needs. I am confident in my ability to help students improve their grades and reach their academic goals.
5.00+
1+ Reviews
10+ Question Solved
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Question Posted:
Students also viewed these Computer science questions
-
An extraction system has a distribution ratio of 10. If 300 mg of the substance is dissolved in 100mL of solvent A, calculate the amount of the extracted substance if carried out with 100 mL of...
-
If e = -77/6 be an angle in standard position and P(0) the point on its terminal side on the unit circle. Answer the following: 1. its illustration 2. its reference angle 3. location of its terminal...
-
Determine whether the matrix is in row-echelon form. If it is, determine whether it is also in reduced row-echelon form. 1 3 0 1 00 10-4 1 0 0 0 (c) 0 0 1 -100 (a) 1 1 1010 (b) 0 1 -1 3 0 0 0 0. 0 0...
-
Which of the theoretical approaches are the most useful in explaining your organisations current IHRM policies and practices?
-
The following tasks are required to assemble an alarm clock radio. The assembly line would like to achieve an output of 40 finished radios per hour. a. What takt time is required to achieve the...
-
For the pinball game of Prob. 2/109, if the plunger imparts an initial speed of 3 m /s to the ball at time t = 0, determine the acceleration a of the ball (a) at time t = 0.08 s and (b) at time t =...
-
What is the objective of DT&E?
-
Hard Core had budgeted sales of 190,000 feet of its concrete culvert products for June 2010. Each foot of product requires 4 pounds of concrete ($0.10 per pound) and 7.5 pounds of gravel ($0.04 per...
-
1 . Explain why there is a difference of $12 between total liabilities and equity on the corporate balance sheet and on the single proprietorship balance sheet. 2.Explain the differences between...
-
A demolition ball is used to tear down a building. Its distance s (in m) above the ground as a function of time t (in s) after it is dropped is s = 17.5 4.9t 2 . Because s = f (t), find f(1.2).
-
This is an if statement that appears inside another if statement. a. Nested if statement b. Tiered if statement c. Dislodged if statement d. Structured if statement
-
Briefly describe how the || operator works.
-
Should business writers avoid contractions? Why?
-
A rocket is launched with a speed of 9.00 x 102 m/s vertically out from the surface of a spherical planet with a mass of 1.00 x 1025 kg and a radius of 7.00 x 107 m. What is the maximum distance from...
-
A guitar string of length 87.5 cm and mass 7.50 grams is plucked with a force of 3.25 N and starts vibrating at a constant frequency of 469 Hz. What is the linear mass density of the string? (Make...
-
Refer to Hubspot's Not another state of marketing report.Links to an external site. As you examine the report, pick out a key finding or trend that catches your eye. Then answer the following: What...
-
Compare and contrast the similarities and differences between a four Ps approach to marketing and the value approach (creating, communicating, and delivering value). Part 2: Select two...
-
My state is Mississippi/ or local government and research the significant funds. Explain and then, address the following: What are the significant funds of your state or local government, and how do...
-
For its fabricated metal products, the Able Corp. is buying $10,000 of special tools that have a 4-year useful life and no salvage value . Compute the depreciation charge for the second year by each...
-
l ask this second time correnct answer is 38,01 can we look pls Consider a non-conducting rod of length 8.8 m having a uniform charge density 4.5 nC/m. Find the electric potential at P, a...
-
A __________ is any hypothetical person using a program and providing input for it. a. Designer b. User c. Guinea pig d. Test subject
-
A __________ is a name that references a value in the computers memory. a. Variable b. Register c. RAM slot d. Byte
-
Write a Python statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable total.
-
Martin Company applies manufacturing overhead based on direct labor hours. Information concerning manufacturing overhead and labor for the year is as follows: Actual manufacturing overhead Estimated...
-
$ 719,000 280,000 439,000 150,400 Joyner Company's income statement for Year 2 follows: Sales Cost of goods sold Gross margin Selling and administrative expenses Net operating income Nonoperating...
-
FIFO and LIFO costs under perpetual inventory system The following units of an item were available for sale during the year: Beginning inventory 22 units at $44 Sale 18 units at $62 First purchase 18...
Study smarter with the SolutionInn App