Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable
Question:
Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable z if the variable x is greater than 100.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (1 review)
The following if statement assigns 20 to the variable y a...View the full answer
Answered By
John Aketch
I have a 10 years tutoring experience and I have helped thousands of students to accomplish their educational endeavors globally. What interests me most is when I see my students being succeeding in their classwork. I am confident that I will bring a great change to thins organization if granted the opportunity. Thanks
5.00+
8+ Reviews
18+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
1.Write an it statement that assigns 20 to the variable y and assigns 40 to the variable z it the variable x is greater than 100. 2. Write an if statement that assigns 0 to the variable b and assigns...
-
Specialist Printers Pty Ltd commenced business on 1 July 2018. o On 30 August 2018, the business purchased a second-hand truck for $38,500 (GST Inclusive) for deliveries. Stamp duty amounted to...
-
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.
-
Discuss the advantages or disadvantages of subsidiary legislations in the Malaysian legal system in dealing with Covid-19 vaccination. Please write down the legal terms for discussion. Please do not...
-
Dillard Travey receives 5,000 tripods annually from Quality Suppliers to meet his annual demand. Dillard runs a large photographic outlet, and the tripods are used primarily with 35-mm cameras. The...
-
Figure 1.9 shows the single-line diagram of a balanced three-phase power system, in which a synchronous generator has been connected to a no-load transmission line through a transformer. Calculate...
-
Which of the following statements is correct? a. The expected population deviation rate has little or no effect on sample size. b. As the population size doubles, the sample size also should double....
-
Ace Industries has current assets equal to $3 million. The companys current ratio is 1.5, and its quick ratio is 1.0. What is the firms level of current liabilities? What is the firms level of...
-
1. The accounting records of Soft Fur Traders include these accounts: Data Table Cash Jan 1 Receipts Jan 31 40,000 Jan 1 440,000 Payments 445,000 Receipts 35,000 Jan 31 Accounts Receivable 1,000...
-
Write a program that asks the user to enter an integer. The program should display Positive if the number is greater than 0, Negative if the number is less than 0, and Zero if the number is equal to...
-
You can write any program using only sequence structures.
-
What people, organization, and technology factors contributed to these problems? How much was management responsible?
-
A species of fish was added to a lake. The population size P (1) of this species can be modeled by the following function, where t is the number of years from the time the species was added to the...
-
A biologist has a 6 9 2 6 - gram sample of a radioactive substance. Find the mass of the sample after six hours if it decreases according to a continuous exponential decay model, at a relative rate...
-
Solve by factoring. K x+7x+12=0
-
K Let f(x)=2 x-2 if x <4 if 4x8. x+1 if x 8 a. Find lim f(x). x4 b. Find lim f(x). x-8
-
5. Aya rode her bicycle from her house to a friend's house, averaging 16 km per hour. It turned dark before she was ready to return home, so her friend drove her home at a rate of 8 km per hour. If...
-
Gable Industries manufactures a popular interactive stuffed animal for children that requires two computer chips inside each toy. Gable Industries pays $3 for each computer chip. To help guard...
-
Economic feasibility is an important guideline in designing cost accounting systems. Do you agree? Explain.
-
Assume that a program has two String variables named str1 and str2. Write a pseudocode statement that assigns an all uppercase version of str1 to the str2 variable.
-
Look at the following pseudocode function definition: a. What is the name of the function? b. What type of data does the function return? c. Given the function definition, what will the following...
-
What is the purpose of the isInteger and isReal functions described in this chapter?
-
2. Consider the following two-layer network. (1) X2") The weights and bias for X() is (5,-3) and 2, respectively. The weights and bias for X() is (-2,6) and -1, respectively. The weights and bias for...
-
Write a program that prompts the user for their quarterly water bill for the last four quarters. The program should find and output their average monthly water bill. If the average bill exceeds $75,...
-
7. a. When translated to machine code, a branch instruction uses its last twelve bits to specify an offset in words. This is unlike an LDR instructions, which uses the last eight bits of the...
Study smarter with the SolutionInn App