Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Explore our Q&A platform to find in-depth answers from a wide range of experts in different fields. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

PRACTICAL ACTIVITY

1.Write a program in python to find the area of rectangle with following inputs:
Length = 4
Breadth = 5

2. Write a program in python to print multiples of 5

3. Write a program in python to check if the given number is positive or negative

4. Write a program in python to find the following
a) Average of 3 numbers
b) Power of 2 numbers
c) Minimum of 3 numbers


Sagot :

"""

1.Write a program in python to find the area of rectangle with following inputs:

Length = 4

Breadth = 5

2. Write a program in python to print multiples of 5

3. Write a program in python to check if the given number is positive or negative

4. Write a program in python to find the following

a) Average of 3 numbers

b) Power of 2 numbers

c) Minimum of 3 numbers

"""

# Program 1

print("Question 1")

print("Rectangle Area Calculator")

length  = int(input("Enter length  > "))

breadth = int(input("Enter breadth > "))

print(length * breadth)

# Program 2

print("Question 2")

for multiplier in range (0, 13):

   print(5 * multiplier)

# Program 3

print("Question 3")

num = int(input("Enter a number to check if positive or negative > "))

if num > 0:

   print("positive")

elif num < 0:

   print("negative")

else:

   print("0")

# Program 4

# Part A

print("Question 4A")

num1 = int(input("Enter first num > "))

num2 = int(input("Enter second num > "))

num3 = int(input("Enter third num > "))

print("Average:", (num1 + num2 + num3) / 3)

# Part B

print("Question 4B")

base  = int(input("Enter base > "))

power = int(input("Enter power > "))

print(base ** power)

# Part C

print("Question 4C")

num1 = int(input("Enter first num > "))

num2 = int(input("Enter second num > "))

num3 = int(input("Enter third num > "))

print("Min:", min(num1, num2, num3))

Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. Thank you for choosing our platform. We're dedicated to providing the best answers for all your questions. Visit us again. Keep exploring Westonci.ca for more insightful answers to your questions. We're here to help.