پایتون – سطح: 1 کار

Summarize this content to 400 words in Persian Lang
وظایف سطح 1
1) تبدیل فارنهایت به سلسیوس
f=int(input(“Enter the no. “))
c=5/9*(f-32)
print(“Fahrenheit to celsius”,round(c))
خروجی:
Enter the no. 108
Fahrenheit to celsius 42
2) تبدیل سلسیوس به فارنهایت
c=int(input(“Enter the no. “))
f=c*(9/5)+32
print(“celsius to fahrenheit”,round(f))
خروجی:
Enter the no. 42
celsius to fahrenheit 108
3) تبدیل فوت به متر
#1 Feet = 0.3048 meters
feet=float(input(“Enter the no. “))
meter=feet*0.3048
print(“feet to meters”,round(meter,1))
خروجی:
Enter the no. 15
feet to meters 4.6
4) سمت ورودی، خروجی – مساحت یک مربع
side=float(input(“Enter the no. “))
area=side**2
print(“Area of a square is “,area)
خروجی:
Enter the no. 5
Area of a square is 25.0
5) ورودی-طول، عرض؛ خروجی- مساحت مستطیل
#Area of a Rectangle=length*breadth
length=float(input(“Enter length of the rectangle. “))
breadth=float(input(“Enter breadth of the rectangle. “))
area=length*breadth
print(“Area of a rectangle is “,area)
خروجی:
Enter length of the rectangle. 5
Enter breadth of the rectangle. 10
Area of a rectangle is 50.0
6) شعاع – مساحت دایره
#Area of circle = πr2
r=int(input(“Enter the radius of circle: “))
area=3.14*(r**2)
print(“Area of the circle is “,area)
خروجی:
Enter the radius of circle: 5
Area of the circle is 78.5
7) تبدیل USD به INR
#usd=Rs. 84.56
dollar=float(input(“Enter currency in dollars: “))
usd=dollar*84.56
print(“Currency in rupees is =”,usd)
خروجی:
Enter currency in dollars: 500
Currency in rupees is = 42280.0
وظایف سطح 1
1) تبدیل فارنهایت به سلسیوس
f=int(input("Enter the no. "))
c=5/9*(f-32)
print("Fahrenheit to celsius",round(c))
خروجی:
Enter the no. 108
Fahrenheit to celsius 42
2) تبدیل سلسیوس به فارنهایت
c=int(input("Enter the no. "))
f=c*(9/5)+32
print("celsius to fahrenheit",round(f))
خروجی:
Enter the no. 42
celsius to fahrenheit 108
3) تبدیل فوت به متر
#1 Feet = 0.3048 meters
feet=float(input("Enter the no. "))
meter=feet*0.3048
print("feet to meters",round(meter,1))
خروجی:
Enter the no. 15
feet to meters 4.6
4) سمت ورودی، خروجی – مساحت یک مربع
side=float(input("Enter the no. "))
area=side**2
print("Area of a square is ",area)
خروجی:
Enter the no. 5
Area of a square is 25.0
5) ورودی-طول، عرض؛ خروجی- مساحت مستطیل
#Area of a Rectangle=length*breadth
length=float(input("Enter length of the rectangle. "))
breadth=float(input("Enter breadth of the rectangle. "))
area=length*breadth
print("Area of a rectangle is ",area)
خروجی:
Enter length of the rectangle. 5
Enter breadth of the rectangle. 10
Area of a rectangle is 50.0
6) شعاع – مساحت دایره
#Area of circle = πr2
r=int(input("Enter the radius of circle: "))
area=3.14*(r**2)
print("Area of the circle is ",area)
خروجی:
Enter the radius of circle: 5
Area of the circle is 78.5
7) تبدیل USD به INR
#usd=Rs. 84.56
dollar=float(input("Enter currency in dollars: "))
usd=dollar*84.56
print("Currency in rupees is =",usd)
خروجی:
Enter currency in dollars: 500
Currency in rupees is = 42280.0