Answer:
Following are the answer to this question:
x=int(input("Enter number: "))#defining x variable that input value from user end
if x< 0:#defining if block that check x value is less then 0
while x<0:#defining while loop print up to the value
print(x)#print value
x+= 1#add values by 1
elif x>0:#defining elif block to check value x is greater than 0
while x>0:#defining while loop to print down to value
print(x)#print value
x-= 1#subtract value by 1
Output:
when input is a positive value
Enter number: 5
5
4
3
2
1
when input is a negative value
Enter number: -5
-5
-4
-3
-2
-1
Explanation:
- In the given python code, x variable is declared that input the value from the user end, in the next step if and elseif block is declared that calculates and prints its value.
- In the if block, it checks value is negative it uses the while loop to prints its values in the down to value form.
- In the elif block, it checks the positive it uses the while loop to prints its values into the up to values form.
Answer:
See explaination
Explanation:
CREATE TABLE CATEGORY
(
cid int NOT NULL,
description varchar2(1000),
PRIMARY KEY (cid)
);
CREATE TABLE PRODUCT
(
pid int NOT NULL,
description varchar2(1000),
cid int,
price int,
p_size varchar2(1),
CONSTRAINT chk_price CHECK (price>0),
CONSTRAINT chk_size CHECK (p_size in ('S','M','L')),
CONSTRAINT fk_cid FOREIGN KEY (cid) REFERENCES CATEGORY(cid)
);
You put the dash on the right side up top ape
Answer:
Drop down list
Explanation:
You have not listed what the possible answers are, however a drop down list would be an option to accomplish this.