Answer:
The procedure in SQL is created as follows
Explanation:
--creating the procedure
CREATE OR REPLACE PROCEDURE prc_inv_amounts (W_IN IN NUMBER)
AS
--defining variables
W_CK NUMBER := 0;
W_SUBT NUMBER := 0;
W_TAX NUMBER := 0;
BEGIN
--Authentication process of the invoice
SELECT COUNT(*) INTO W_CK FROM INVOICE WHERE INV_NUMBER := W_IN;
--Transaction confirmation
IF W_CK = 1 THEN
SELECT SUM(LINE_TOTAL) INTO W_SUBT FROM LINE
WHERE
--checking the invoice for the desired invoice number
LINE.INV_NUMBER = W_IN;
W_TAX :=W_SUBT * 0.08;
--updating the invoice
UPDATE INVOICE
--setting the new values
SET INV_SUBTOTAL = W_SUBT,
INV_TAX = W_TAX,
INV_TOTAL =W_SUBT + W_TAX
WHERE INV_NUMBER = W_IN;
--ending the if statement
END IF;
--ending the procedure
END;
Answer:
while (userNum >=0) {...}
Explanation:
In a <u>while loop</u>, <u>the loop is executed until the condition is false</u>.
Since the loop will execute while the user enters a number greater than or equal to 0 (and that number is declared as <em>userNum</em>), we need to check if <em>userNum</em> is greater than or equal to 0.
Answer:
Attached is a screenshot of my code for 'PasswordGenerator' and the tests necessary.
Explanation:
If you need any explanation, please ask!
Answer:
class PersonInfo:
def __init__(self):
self.num_kids = 0
def inc_num_kids(self):
self.num_kids += 1
person1 = PersonInfo()
print('Kids:', person1.num_kids)
person1.inc_num_kids()
print('New baby, kids now:', person1.num_kids)
Explanation:
Line 1 of the code, we define the class PersonInfo. Line 3 of the code is the function that will increment the member data num_kids.
Answer:
A. 50 percent
Explanation:
The correct option is - A. 50 percent
Another preventive measure you can take is to maintain the relative humidity at around 50 percent. Be careful not to increase the humidity too far—to the point where moisture starts to condense on the equipment.