مساحت مربع
برنامه ای بنویسید که طول ضلع مربعی را از ورودی دریافت کند و مساحت آن را حساب کند
مساحت مربع = یک ضلع ضربدر خودش = یک ضلع یه توان 2
👨💻 2 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که طول ضلع مربعی را از ورودی دریافت کند و مساحت آن را حساب کند
مساحت مربع = یک ضلع ضربدر خودش = یک ضلع یه توان 2
mor = float(input("mor:"))
x = mor * mor
print(x)
x=int(input("x: "))
x *=x
print("masahat= ", x)
a = int(input("Length or width: "))
print(a*a)
#در مرحله اول ضلع مربع را دریافت میکنیم
zel = float(input(' zelh ra vared konid : '))
# در مرحله دوم مساحت مربع را محاسبه میکنیم
massahat = ( zel*zel)
# در مرحله سوم نتیجه را پرینت میکنیم
print ('=' , massahat)
a = float(input('please enter the size: '))
s = a*a
print('answer:',s)
# مساحت مربع
def power(a):
return a*a
i = int(input("square side: "))
j = power(i)
print("S:",j)
zla_morabba= int(input("zla morbba mad nazar ra vared knid:"))
s_morabba =int(zla_morabba **2)
print (s_morabba)
lenght = float(input("Enter square's side lenght:"))
print(f"The area of a square with a side length of {lenght} is equal to {lenght ** 2}")
# Calculating the area of a square
square_Side = input("Enter the side of the square. ")
try:
squareValue = int(square_Side)
except ValueError:
squareValue = float(square_Side)
formula = squareValue * squareValue
print("The area of the square is", formula, "square units.")
t=int(input('Tool Zele Morabae:'))
masahat=(t * t )
print(masahat)
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.