Answer:
The program in Python is as follows:
num1 = int(input())
num2 = int(input())
if num1 >=0 and num2 >= 0:
print(num1+num2)
elif num1 <0 and num2 < 0:
print(num1*num2)
else:
if num1>=0:
print(num1**2)
else:
print(num2**2)
Explanation:
This gets input for both numbers
num1 = int(input())
num2 = int(input())
If both are positive, the sum is calculated and printed
<em>if num1 >=0 and num2 >= 0:</em>
<em> print(num1+num2)</em>
If both are negative, the products is calculated and printed
<em>elif num1 <0 and num2 < 0:</em>
<em> print(num1*num2)</em>
If only one of them is positive
else:
Calculate and print the square of num1 if positive
<em> if num1>=0:</em>
<em> print(num1**2)</em>
Calculate and print the square of num2 if positive
<em> else:</em>
<em> print(num2**2)</em>
Answer:
ay di ko alam yan hahahaha
Answer:
integer currentPrice
integer lastMonthPrice
integer changeLastMonth
float mortagage
//Reading input
currentPrice = Get next input
lastMonthPrice = Get next input
//Calculating price change
changeLastMonth = currentPrice - lastMonthPrice
//Calculating mortagage
mortagage = (currentPrice * 0.045) / 12
//Printing output
Put "This house is $" to output
Put currentPrice to output
Put "\nThe change is $" to output
Put changeLastMonth to output
Put " since last month." to output
Put "\nThe estimated monthly mortgage is $" to output
Put mortagage to output
A. fuel ; when you but a car you aren't buying the gas to go in it