1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Luba_88 [7]
2 years ago
11

Consider the following code:

Computers and Technology
1 answer:
Volgvan2 years ago
8 0

Answer:

The code will get stuck in an infinite loop.

Explanation:

Since val is decreasing by 1 each time it meets the criteria of being smaller than 10, your code will get stuck in an infinite loop since val will always be smaller than 10.

Hope this helps :)

You might be interested in
What is the practice of distributing responsibility among multiple people so that no one person has full control of
Sholpan [36]

Answer:

If the responsibilities are distributed ,the disputes amongst people wont take place because their wont be any partiality, everyone would be equal. Moreover it is difficult for one person to control everything at once and multiple people would help the work to be organized as everyone will have their own part of work which is supposed to be fulfilled.

8 0
2 years ago
Write a SELECT statement that returns one row for each customer that has orders with these columns:
d1i1m1o1n [39]

Answer:

SELECT email_address,

SUM(item_price * Quantity) AS item_price_total,

SUM(discount_amount * Quantity) AS discount_amount_total

FROM Customers c

JOIN Orders o ON c.CustomerID = o.CustomerID

JOIN Order_Items oi ON o.OrderID = oi.OrderID

GROUP BY email_address

ORDER BY item_price_total DESC

Explanation:

In this SQL statement the SELECT statement selects the following columns:

email_address

item_price

Quantity

discount_amount

There are two tables Customers and Order_Items

SUM aggregate function is used to add the values of the product of the columns discount_amount and Quantity. It is also used to get the sum of the product of two columns discount_amount and Quantity.

A new temporary column named item_price_total is used to name the sum of the product of two columns discount_amount and Quantity using AS which is ALIAS and it is used to give a name to some columns or a table.

Similarly discount_amount_total name is given to the column which calculate the sum of the product of two columns i.e. discount_amount and Quantity.

JOIN is used here to join the columns from the tables Order_items and Customers.

GROUP BY is used to group the result of rows and is used with functions like SUM. Here the rows are grouped by the email address.

ORDER BY is used to order the result. Here the result is ordered by item_price_total in descending  order.

This SELECT statement can also be written as following:

SELECT c.email_address,

SUM(o.item_price * o.Quantity),

SUM(o.discount_amount * o.quantity)

FROM customer c

JOIN Order_Items o ON o.id = c.id

GROUP BY c.email_address

7 0
3 years ago
Katie is training for a marathon and wants to run a
Eva8 [605]

Answer: 115 miles a month

Explanation:

460/4

which equals

<em><u>115 miles per month</u></em>

6 0
3 years ago
Which code results in a ValueError?<br><br> int('seven')<br> float(2.5)<br> int(7)<br> 8 / 0
SOVA2 [1]

Answer:

Int(‘seven’)

Explanation:

Took one edg

6 0
3 years ago
Read 2 more answers
How can I create an app ? What should I download from the App Store ? How can I put my app in the App Store ? PLEASE GIVE ME THE
crimeas [40]
It's not easy to create an app for cellphones it is harder than to create those for computers. You would need to learn swift coding language to create an application. 
6 0
3 years ago
Read 2 more answers
Other questions:
  • Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invo
    8·1 answer
  • What types of data are commonly entered into a cell ?
    7·2 answers
  • Respecting culture in the workplace means understanding that
    5·2 answers
  • Lewis is using a stylus with his touch screen computer in order to draw a
    8·1 answer
  • 4. An advantage presented by straight-in spaces is that
    12·1 answer
  • What are two advantages of encrypting data stored in the computer system?
    5·1 answer
  • Read the following sentence from an argumentative essay.
    11·1 answer
  • An attacker compromises the Washington Post's web server and proceeds to modify the homepage slightly by inserting a 1x1 pixel i
    12·1 answer
  • Which of the following might cause a shift from PPF1 to PPF2? I. A new source of high quality denim fabric. II. A new lighter me
    12·1 answer
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!