تمرین برنامه نویسی؛ با کدبزن!

منبع جامع سوالات و تمرینات برنامه نویسی

34
+1
+1
+1

محاسبه مساحت مستطیل

پربازدید Admin آسان 2/ دانلود 12705 بازدید

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

119 جواب

نمیتونم این تمرین رو حل کنم!
26
+1
+1
+1
a = int(input("length: ")
b = int(input("width: ")

print(a * b)
Amirkoulivand دانلود Python

پرانتزها بسته نشده خطا میده Sadeghfarahani


11
+1
+1
+1
a= float(input("salam lotfan tole mostatil ra vared kunid:"))
b= float(input("lotfan arze mostatil ra vared kunid:"))
print(f"masahate mostatil {a*b} ast")
Amiripy دانلود Python
8
+1
+1
+1
a = float(input('tool:'))
b = float(input('arz:'))
print(float(a*b))
Pouriya دانلود Python

float تو پایتون به معنای عدد اعشاریه که...اگه int میزدی بهتر نبود؟ Aylin


وقتی از float استفاده میشه نتیجه دقیقتر خواهد بود Admin


7
+1
+1
+1
l= int(input("length: "))
w= int(input("width: "))
area = l*w
print(f"The area is: {area}") 
Tamara دانلود Python
7
+1
+1
+1
Tol = int(input("tol : "))
Arz = int(input("arz : "))
print(Arz * Tol)

Arianpro دانلود Python
5
+1
+1
+1
print('mohasebe masahat mostatil')
length=float(input('tool: '))
width=float(input('arz: '))
print('masahat mostatil: ',(length*width))
کاربر 442 دانلود Python
4
+1
+1
+1
a = input('tool: ')
b = input('arz: ')
result = int(a) * int(b)
print(result)
Admin دانلود Python
4
+1
+1
+1
1 = Input ( tol )
2 = input (arz )
3 = ( 1 ) * ( 2 )
print = ( 3 )

3

Sina123 دانلود Python

✌️ Amk2001


3
+1
+1
+1
L=int(input(Length: ))
W=int(input(width: ))
print(L*W)
Zb8319 دانلود Python
2
+1
+1
a = input("Enter a number tul: ")
a = int(a)
b = input("Enter a number arz: ")
b = int(b)
c = a*b
f = (a + b) /2
print(c)
print(f)
Miladkhan دانلود Python
2
+1
+1
a = input("length:")
b = input("width:")
print(int(a) * int(b))
Afra1919 دانلود Python
2
+1
+1
tol = int(input("tol mostatil: "))
arz = int(input("arz mostatil: "))
mas = tol * arz
print("masahat mostatil=", mas)
کاربر 189 دانلود Python
2
+1
+1
X = int(input("enter x: ")
Y = int(input("enter y: ")
Print(X * Y)

کاربر 366 دانلود Python
2
+1
+1
lenght = int(input('Enter your a lenght: '))
width = int(input('Enter your a width: '))
area = lenght * width
print(f 'area is : {area}')
Amir1 دانلود Python
2
+1
+1
1 = input(lenght)
2 = input(width)
print(1*2)


کاربر 444 دانلود Python

این باید int بشه اگر اشتباه نکنم. کاربر 975


2
+1
+1
l = float(input('Enter the length : ')
w = float(input('Enter the width : ')
print(l * w)
کاربر 465 دانلود Python
2
+1
+1
# مساحت مستطیل
a = input("aez:")
b = input("tool:")
a = float(a)
b = float(b)
print(a*b)
کاربر 462 دانلود Python

میتونستی فلوت ها رو مستقیم ضرب در هم کنی کاربر 1444


2
+1
+1
lengh = int(input('size of lengh: '))
width = int(input('size of width: '))
area = lengh*width
print('Area is',area)
Red003 دانلود Python
2
+1
+1
the_length = float(input("length of the rectangle: "))
width = float(input("the width of the rectangel: "))
answer = the_length * width
print(answer)
Sinasohrab دانلود Python
2
+1
+1
lenght = int(input("Please Enter lenght: "))
width  = int(input("Please Enter width: "  ))

print('----------------------')
result = lenght * width
print(f'Rectangle area is: {result}')
Rauf1399 دانلود Python
1
+1
a = int(input("length :"))
b = int(input("width : "))
c = a * b
Print(c) 
Mla23 دانلود Python
1
+1
x = float(input("enter tool: "))
y = float(input("enter arz: "))
c = float(x) * float(y)
a = str(c)
print("S = " + a)
Aryan84 دانلود Python
1
+1
print("welcome")
input("masahat mostatil ra hesab mikoni?")
a =input("tol")
b =input("arz")
a=int(a)
b=int(b)
print(a*b) 
کاربر 96 دانلود Python
1
+1
Arz=input("arz")
Toul=input("Toul")
Arz=int(arz)
Toul=int(Toul)
Print(Arz*Toul)
4t3in دانلود Python
1
+1
a=int(input("tool:"))
b=int(input("arz:"))
area= a*b
print(area)
کاربر 166 دانلود Python
1
+1
tool = int(input('enter tool: '))
arz = int(input('enter arz : '))

print('masahat = ',tool * arz)
Reza01 دانلود Python
1
+1
a = int ( input ("tool "))
b = int ( input ("arz"))

c = a * b
print (c)
Amirsaylent دانلود Python
1
+1
arz=int(input("arz:"))
tool=int(input("tool:"))
print(arz * tool)
Amirowich دانلود Python
1
+1
a = input ("arz mostatil:")
b = input ("tool mostatil:")
masahat = int(a)* int(b)
print("masahat mostatil =", masahat)
کاربر 300 دانلود Python
1
+1
a=int(input('enter length:'))
b=int(input('enter width:'))
print(a*b)
کاربر 355 دانلود Python
1
+1
def area(lenght:int, width:int):
  '''the return area is the rectangle'''
  arae = lenght * width
  return arae

lenght = int(input('Enter your a lenght: '))
width = int(input('Enter your a width: '))

print(area(lenght, width))
Amir1 دانلود Python
1
+1
# طول = a              عرض = b
a = int (input("length of the rectangle :"))
b = int (input("the width of the rectangle :"))
print( a * b )

کاربر 430 دانلود Python
1
+1
a = int(input("طول مسطتیل:"))
b = int (input("عرض مسطتیل:"))
print(a * b)
Arian8080 دانلود Python
1
+1
x = int(input())
y = int(input())
print(x * y)

Amirhossein دانلود Python
1
+1
tool= int (input("enrter tool:..."))
arz= int (input("enter arz:..."))


a=(tool*arz)
print(a)
Sajjad دانلود Python
1
+1
a=int(input(' enter lengthe: '))
b=int(input(' enter width: '))
masahat=a*b
print(masahat)

Abtin67 دانلود Python
1
+1
tol = float (input("tol :")
arz = float (input ("arz":)
result = tol*arz

Print (result)

کاربر 516 دانلود Python
1
+1
length=input("Enter Length : ")
width=input("Enter Width : ")
print(length*width)
کاربر 538 دانلود Python
1
+1
lengs = float(input('lotfan tool ra vared konid : '))
width = float(input('lotfan arz ra vared konid :'))
print(lengs * width)

کاربر 559 دانلود Python
1
+1
tol = float(input('tol: '))
arz = float(input('arz: '))
mostatil = [ tol , arz ]

print( ( mostatil[0] )  *  ( mostatil[1] ) )
کاربر 671 دانلود Python
1
+1
# area function
def area(length:int , width:int) :
     return length * width

#  get and check width
width = int(input("inter width : "))

while(width <= 0) :
     width = int(input("[ invalid ] inter width again : "))

# get and check length
length = int(input("inter length : "))  

while(length <= 0) :
     length = int(input("[ invalid ] inter length again : "))

result = area(length , width)
print(f"{'*' * 8}\n The Area Is : {result} \n{'*' * 8} ")
کاربر 827 دانلود Python
1
+1
val tol = readLine()!!.toInt()
val arz = readLine()!!.toInt()
println(tol*arz)
کاربر 1279 دانلود Kotlin
1
+1
a=float(input("adade aval(tool) ra vared konid:"))
b=float(input("adade dovom(arz) ra vared konid:"))
area = a*b
print("masahat mostatil:",area)
Amirhosseint دانلود Python
1
+1
width = int(input("please enter width(tool) : "))
height = int(input("please enter height(arz) : "))
Area = width * height
print('output: ', Area)
Amirhosseint دانلود Python
1
+1
a= input("tool ra vared konid:")
b= input("aarz ra vared konid:")

c=int(a)
d=int(b)

print(("masahat="),(c*d))
print("moheet=",2*(c+d))
Justsoby دانلود Python
1
+1
#این کد برای محسابه مساحت مستطیل است
A = float(input("Enter arz = "))
B = float (input ("Enter tol= "))
print(A * B)
Nicola دانلود Python
0
arz=int(input("arz:"))
tol=int(input("tool:"))


print(arz *tol)

    

کاربر 304 دانلود Python
0
a =int(input('arz:'))
b =int(input('tol:'))

resuls=int(a) *int(b)

print(resuls)
کاربر 304 دانلود Python
0
a =int(input("tol:"))
b =int(input("masahat:"))
c =(a * b)
print(c)

کاربر 304 دانلود Python
0
tool=input(f'tool mostatil ra vared konid : ')
arz=input(f'arz mostatil ra vared konid : ')
masahat=int(tool)*int(arz)
print(f'masahate mostatil barabar ast ba {masahat} ')

Matineshonam دانلود Python
0
a = float(input('a :'))
b = float(input('b :'))
print('s = '.format(a * b))
Astehal دانلود Python
0
a= int(input("tool  :"))
b=int( input("areze  :"))
print(a,b)
print(a*b)
کاربر 308 دانلود Python
0
h,w = map(int, input('inter number (h,w) :').split(','))
print(h*w)
Arya0pyc دانلود Python
0
Number1 = int(input(" Type Your Number1: ")
Number2 = int (input("Type Your Number2: ")
Print(Number1 * Number2)
کاربر 600 دانلود Python
0
l=float(input('lenght:')
w=float(input('width:')
print(l*w)
Mohana دانلود Python
0
tool=int(input('tool: '))
arz=int(input('arz: '))
print('masahat tool * arz =',tool*arz )
Ordinaryperson دانلود Python
0
Length =int (input("plese ipnut length of the rectangle: "))
width =int (input("plese input width of the rectangle: "))
# Length* width
print(Length * width)  
کاربر 619 دانلود Python

great کاربر 619


0
x = int(input("write a length:"))
y = int(input("write a width:"))
print("answer:",x*y)
Aylin دانلود Python
0
x = int(input("What's the width ? "))
y = int(input("What's the length?"))
print (x*y)
Kian1390 دانلود Python
0
a = int(input(tool mostatil ra vared konid: ))
b = int (input(arz ra vared konid: ))
print(a*b)
کاربر 635 دانلود Python
0
print(float(input('Enter Tol : '))*float(input('Enter Arz : ')))
Aliahmadi98 دانلود Python
0
def mostatil (tool, arz):
   return tool * arz

def main ():
   tool = int(input('Enter Tool : ')
   arz = int(input('Enter arz : ')
  
  print('masahat mostatil = ' , mostatil(tool, arz))

main()
کاربر 576 دانلود Python
0
tool=float(input("toole:"))
arz=float(input("arz"))
print("tool"*"arz")
Dcoder دانلود Python
0
a=int(input(' enter tool  '))
B=int(input(' enter arz  '))
Print(a*B)
Mahdisoltani دانلود Python
0
tool =int (input ("tool che ghadre?"))
arz = int (input ("arz che ghadre?"))
print(arz*tool) 
کاربر 858 دانلود Python
0
print("welcom")
tool=float(input("enter a num:  ")
arz=float(input("enter a num:  ")
print(f" masahat ba tool{tool} * arz {arz}=", tool*arz)
کاربر 875 دانلود Python
0
while True:
    length = int(input("enter the length: "))
    offer = int(input("enter the offer: "))
    print(length * offer)
کاربر 812 دانلود Python
0
Console.WriteLine("Please Enter length of the rectangle :");
int Number_length = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please Enter width of the rectangel :");
int Number_width = Convert.ToInt32(Console.ReadLine());

int rectangle_area = Number_length * Number_width;

Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("*******************************************************************");
Console.ResetColor();

Console.WriteLine("The area of the rectangle is equal to :");

Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine(rectangle_area);
Console.ResetColor();

Console.ReadKey();
Alifasihi دانلود C#
0
print('mohasebe masahat mostatil')
A=input('Tool ra vard konid : ')
B=input('Arz ra vard konid : ')
A=float(A)
B=float(B)
print(A*B)
کاربر 975 دانلود Python
0
let length = prompt("طول مستطیل را بنویسید");
let width = prompt("عرض مستطیل را بنویسید");
rectangle = length * width;
console.log(rectangle);
کاربر 1009 دانلود JavaScript
0
lenght = float ( (input :" lenght" ))
width= float ( (input :" width" ))
print : ( " lenght * width )
کاربر 1015 دانلود Python
0
width = int(input("enter Width: "))
height = int(input("enter Height"))
area = width * height
print(f"Width: {width}\nHeight: {height}\nArea is: {area} ")
Rezanaeemirad دانلود Python
0
print("mohasbe masahat mostatil")
#============//code//=========#
a = int(input("arz: "))
b = int(input("tol : "))
c = ( a * b )
print("kilometr : {}".format(c))
کاربر 1030 دانلود Python
0
m = int (input('m:'))# طول مستطیل است m
n = int(input('n:'))#  عرض مستطیل است n
print(m * n)
Mayoka دانلود Python
0
tol = int(input("what is your tol: "))
arz = int(input("what is your arz: "))

print(tol * arz)
کاربر 1128 دانلود Python
0
x= float(input('tool:'))
y= float(input('arz:'))
masahat = x*y
print('masahat=',masahat)
Soheyl دانلود Python
0
def area():
    lenght = int(input("Enter length:"))
    width = int(input("Enter width:"))
    result = lenght * width
    print(f"area--> {result}")

area()
Javadmirjalili دانلود Python
0
A = float(input("tool": )
B = float(input("arz" : )
Print(A * B)
Mohammadreza87 دانلود Python
0
tol= int(input("toll: "))
arz= int(input("arz: "))
m= (tol * arz)
print ("masahat= ", m)
کاربر 1347 دانلود Python
0
print("To get the perimeter of the rectangle, you need to enter the length and width.")
a = int(input("length:"))
s = int(input("width:"))
d = a * s
print ("rectangle area:", d)
کاربر 1378 دانلود Python
0
print("<< Hello im here tu calculat the area of the rectangle for you so lets do it >> ")

Length = float(input("Please enter length of the rectangle : "))
Width  = float(input("Please enter width of the rectangle : "))

print("The area of the rectangle is = " , Length * Width)

quit = input("Press ENTER to close")
Pooria08 دانلود Python
0
s = int(input("Enter the s: "))
p = int(input("Enter the p: "))

print(s * p)
کاربر 1418 دانلود Python
0
# Enter Tol Mostatil
tol = int(input("طول مستطیل را وارد کنید: "))
# Enter Arz Mostatil
arz = int(input("عرض مستطیل را وارد کنید: "))

print(tol * arz)
Ha3an دانلود Python
0
a =float(input("the width of the rectangel:"))
b = float(input("length of the rectangle:"))
print(a*b)
کاربر 1477 دانلود Python
0
print("masahat mostatil")
Tol = int(input("tol :    "))
Arz = int(input("arz :    "))
print("javab : ",Arz * Tol)
Alikhamooshi دانلود Python
0
tol = int (input("طول مستطیل را وارد کنید"))
arz=int (input("عرض مستطیل را وارد کنید"))
print( tol * arz )
Coder92 دانلود Python
0
print("To calculate the area of ​​the rectangle:")
a=int(input("Please enter the length of the rectangle"))
b=int(input("Please enter the width of the rectangle"))
area=str(a*b)
print("The area of ​​your rectangle is:",area)
کاربر 1600 دانلود Python
0
width = float(input("width:"))
length = float(input("length:"))

print(width * length)
کاربر 1614 دانلود Python
0
a=input(lenght)
b=input(wight)
result=input(a*b)
print=result
int(result=masahate mostatil)
کاربر 1688 دانلود Python
0
# part one => easy :

theWidth = 5
theHeight = 6
area = theWidth * theHeight
print(area)

print("=====================================================")

# part two => medium :

width = int(input(" please enter the width of the rectangle:"))
length = int(input(" please enter the length of the rectangle:"))
print(f"the area of the rectangle is {width * length}")

print("=====================================================")

# part three => hard :

def areaOfRectangle(width,length):
    sum = width * length
    return sum

print(areaOfRectangle(5,6))
Rezaeikhanghah دانلود Python
0
t = int(input("tool: "))
a = int(input("arz: "))
print("macahat: ",a*t)
print("mohit: ",(a+t)*2)
Amirhosein دانلود Python
0
Tol = float(input("Tol Mostatil Ra Vared Konid: ")
Arz = float(input("Arz Mostatil Ra Vared Konid: ")

Print (Tol*Arz)
کاربر 665 دانلود Python
0
tool= float(input("tool : "))
arz= float(input('arz : '))
masahat= tool*arz

print('masahate mostatil = {} × {} = {}'.format(tool,arz,masahat))
Soheyl دانلود Python
0
a=int(input("Rectangle length: "))
b=int(input("Rectangle width: " ))
c= a*b
print("s:", c)
کاربر 1771 دانلود Python
0
tol = input('enter tol: ')
arz = input('enter arz: ')
s =  tol*arz
print('masahat = '+s)
کاربر 1767 دانلود Python
0
tool = int and float(input("Tool: "))
arz = int and float(input("Arz : "))
masahat = print(f"Masahat : {tool * arz}")
Aradmns دانلود Python
0
tool = eval(input("tool ra vared konid:"))
arz = eval(input("arz ra vared konid:"))
a = tool * arz
print(a)
Alirezaakbari دانلود Python
0
print("Program for calculating the area of a rectangle")
Length =float(input("write your length : "))
Width =float(input("write your Width : "))
print(f"The area of the rectangle you want is : {Length*Width}")
کاربر 1800 دانلود Python
0
a = int(input("Enter the length of the rectangle: "))
b = int(input("Enter the width of the rectangle: "))
print("rectangle area :" , a*b)
کاربر 1855 دانلود Python
0
tool=int(input("tool ra vared konid : "))
arz=int(input("arz ra vared konid : "))
masahat = tool * arz
print(masahat)
Mohsen0safari دانلود Python
0
a=int(input("length "))
b=int(input("width "))
print("area : " , a*b)
کاربر 1888 دانلود Python
0
x = int(input("طول مستطیل را وارد کنید: "))
y = int(input("عرض مستطیل را وارد کنید: "))

a = x * y

print("مساحت مستطیل برابر است با" + " " + str(a))
کاربر 1803 دانلود Python
0
print(" Enter number for ,a= لوط   b=ضرع ")
a=int(input("a= "))
b=int(input("b= "))
 
masahat=a*b
mohit=(a+b)*2
print( "masahat={} , mohit={} ".format(masahat,mohit))
کاربر 1951 دانلود Python
0
name = int(input("tool:"))
names = int(input("arz:"))
result = name * names
print("javab:",result)
کاربر 1964 دانلود Python
0
const length = prompt("please Enter Length:");
const width = prompt("please Enter Width: ");
console.log(`areaTheCircle: ${length * width}`);
کاربر 1937 دانلود JavaScript
0
tool = float(input("Enter your number: "))
arz = float(input("Enter your number: "))

x = tool*arz
print("area is {}".format(x))
Alir123 دانلود Python
0
tool = int(input('enter tool: '))
arz=int(input('enter arz: '))
def masahat_mostatil(tool,arz):
    finallY=tool*arz
    return finallY
print(masahat_mostatil(tool=tool,arz=arz))
Knowledgebiome دانلود Python
0
a = input("width: ")
a =int(a)
b = input("length: ")
b =int(b)
print("answer=",a*b)
کاربر 2041 دانلود Python
0
t = int(input('please enter lentgh : '))
a = int(input('please enter width : '))
s = t * a
print(s)
کاربر 2015 دانلود Python
0
length=float(input('length:'))
width=float(input('width:'))
print(length*width)
Mahbodnapouri دانلود Python
0
a = float(input("tol mostatil"))
b = float(input("arz mostatil"))
print(a*b)

کاربر 2114 دانلود Python
0
x = float(input("toolesh chande? "))
y = float(input("arzesh chande? "))
masahat = x * y
print(masahat)

کاربر 2045 دانلود Python
0
a = int(input("arz mostatil : "))
b = int(input("tol mostatil : "))
c = a * b
print (c)
کاربر 2265 دانلود Python
0
tool=int(input("tool="))
arz=int(input("arz="))
masahat=tool*arz
print(masahat)
Alireza949 دانلود Python
0
 int(input("enter the length of the rectangel :"))
y = int(input("enter the width of the rectangel :"))
p = x + y
p = p * 2 
print("the perimeter is : " , p )
a = x * y
print("the area is : " , a )
کاربر 2341 دانلود Python

ارسال جواب

# کداتو توی این بخش بنویس
# فرقی نمیکنه چه زبان برنامه نویسی باشه، همرو پشتیبانی میکنیم :)
# البته قبلش این سه خط رو پاک کن


  • تو جوابت میتونی از تصویر، کد، لینک به سایر صفحات و... استفاده کنی
  • لطفا جواب های تکراری ارسال نکن
  • جواب های ارسالی، پس از بررسی کوتاهی، ویرایش میشن و در سایت نمایش داده میشن
  • ارسال جواب حق مادی یا معنوی برای ارسال کننده ایجاد نمیکند و تمام حقوق برای سایت کدبزن محفوظ است

تمرینات مرتبط

تشخیص با استفاده از هوش مصنوعی
×
×
بستن