Computer Science, asked by anu236239, 3 months ago

Q1. Write a program to find the product of two numbers entered by users.
Q2. Write a program to calculate perimeter and area of square in python

Answers

Answered by BrainlyProgrammer
10

Question 1:

  • WAP to find the product of two numbers entered by user.
  • Programming language:- Not mentioned Done in Python Language

Answer 1:

a=(int)(input("Enter 1st number"))

b=(int)(input("Enter 2nd number"))

pro=a*b

print("Product=",pro)

____________

Question 2:

  • WAP a program to calculate perimeter and area of a square in python

Answer 2:

s=(int)(input("Enter a side of a square"))

p=4*s

a=s*s

#Or you can write a=s* * 2

print("Perimeter=",p)

print("Area=",a)

_______

Variable Description (Including both the answers):-

  1. s:-To Accept side of the square from the user
  2. p:- to calculate perimeter
  3. a:- to calculate area
  4. pro:- to calculate product
  5. a:- to accept first Number from the user
  6. b;- to accept second Number from the user

_____

•Output attached

Attachments:
Similar questions