<h2>Solution :</h2>
The given problem is solved in Python.
def ComputeSquare():
side = float(input('Enter the side of the square: '))
if side > 0:
perimeter = 4 * side
area = side * side
print('Perimeter of the square is:',
perimeter, 'unit.')
print('Area of the square is:', area, 'square unit.')
<h3> else:</h3>
print('Invalid input.')
ComputeSquare()
<h2>Explanation :-</h2>
- In this program, we create a function ComputeSquare() to calculate the perimeter and area of a square.
- The function asks the user to enter the side of the square. The side is then stored in a variable.
- Now, we check whether the side is greater than 0 or not using if-else statement.
- If the condition is true, the perimeter and area is calculated which is displayed using print() statement.
- If the condition is false, the else blocks executes printing the error message.
<h3>Refer to the attachment for output.</h3>
Answer:
11x12x12x14x15x16=5,322,240
Explanation:
11*12=132
12*14=168
15*16=240
132*168=22,176
240*22,176=5,322,240
Have a nice day! :)
Answer:#include <stdio.h>
int main() {
int num;
printf("Enter an integer: ");
scanf("%d", &num);
// true if num is perfectly divisible by 2
if(num % 2 == 0)
printf("%d is even.", num);
else
printf("%d is odd.", num);
return 0;
}
The SQL SELECT built-in function COUNT none of the above options.
<h3>What is a SELECT query?</h3>
A select query is known to be a kind of a database object that depicts the information that is shown in Datasheet view.
Note that A query does not save data, it shows data that is saved in tables. The SELECT statement is known to be one that is often used to select data from what we call a database.
Hence, The data returned is said to be saved in a result table, known to be the result-set.
Based on the above, the SQL SELECT built-in function COUNT none of the above options.
Learn more about SQL SELECT from
brainly.com/question/10097523
#SPJ1
Answer:
By presuming the question expect us to write a program to address the problem and the solution code written in Python is as follow:
- beer_name = input("Enter beer name: ")
- abv = int(input("Enter ABV value: "))
-
- if(abv > 10):
- label = "Very High"
- elif(abv >=6):
- label = "High"
- elif(abv >=3):
- label = "Average"
- else:
- label = "Low"
-
- print("Beer Name: " + beer_name)
- print("ABV value: " + str(abv))
- print(label)
Explanation:
Firstly, we can use input function to prompt user to input beer name and ABV value (Line 1 - 2).
Next, create if else if statements to check abv fallen into which range of value and then set a label accordingly (Line 4 -11). For example if abv is 4, the label will be set to "Average".
At last, print the information of beer that includes beer name, abv value and label (Line 13 - 15).