حالت آفلاین — محتوا از حافظهٔ کش نمایش داده می‌شود
همهٔ تمرین‌ها

مساحت مربع

تمرین آسان 6607 visibility link download flag trending_up پربازدید

برنامه ای بنویسید که طول ضلع مربعی را از ورودی دریافت کند و مساحت آن را حساب کند

مساحت مربع = یک ضلع ضربدر خودش = یک ضلع یه توان 2

👨‍💻 1 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد

پاسخ‌ها 73

# مساحت مربع
x = float(input("Enter the size of the side of the square: "))

if x > 0:
    print("Square area = " , x*x)

else:
    print("Error. Please enter the correct size.")

# mohasebe masahat  morabba
a = input (" tol yek zel ra vard kon : ")
zel_morabba = float(a)
masahat = zel_morabba * zel_morabba
print (" masahat_morbbai be zel ",zel_morabba, "===>" , masahat )
print ("Find the area of ​​a square by saide.") # question
a = int(input("Enter the number of sides:")) # data
b = (a * a) # formula
print("anointing:",b) # answer

ارسال جواب

جوابت را با Markdown بنویس و ثبت کن

×
بستن