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:
Excel MIN Function
Explanation:
Excel MIN Function is used to get the smallest value which means, it returns the smallest value in the array(a set of data).
syntax is =MIN (number1, [number2], ...)
Answer:
Check the explanation
Explanation:
All website around the world/internet is a collection of different web pages, HTML can be referred to as the single most essential standard when it comes to web design, as well as it being the only one that’s enormously required or needed if you plan to create a web page.
to answer the question above, we will be creating an HTML document that describes nested ordered lists of cars, kindly check the attached images below to see the written codes to solve the question.
Paste Link lets you automatically update the referenced document.
Answer:
Below is the required code:
Explanation:
Python Code
import os
import bin
dir = input("Please specify the location to the directory")
list = os.walk(dir)
a = length(list[1])
b = length(list[2])
print "Files: %n , Sub-dirs : %n" % (b,a)
decision = _(" Do you want to continue? (y/n) "))
if(decision):
cls
else :
exit()