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
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):-
- s:-To Accept side of the square from the user
- p:- to calculate perimeter
- a:- to calculate area
- pro:- to calculate product
- a:- to accept first Number from the user
- b;- to accept second Number from the user
_____
•Output attached
Attachments:
Similar questions
Psychology,
2 months ago
Hindi,
2 months ago
Biology,
2 months ago
Science,
4 months ago
Computer Science,
4 months ago
English,
10 months ago
English,
10 months ago
Geography,
10 months ago