محاسبه حجم مکعب مستطیل
برنامه ای بنویسید که طول و عرض و ارتفاع مکعب مستطیلی را دریافت کند و حجم آن را محاسبه کند
حجم مکعب مستطیل = طول * عرض * ارتفاع
برنامه ای بنویسید که طول و عرض و ارتفاع مکعب مستطیلی را دریافت کند و حجم آن را محاسبه کند
حجم مکعب مستطیل = طول * عرض * ارتفاع
def hajm(a , b, c) :
return a * b * c
a = int(input('tool :'))
b = int(input('arz :'))
c = int(input('ertefa :'))
print('hajm mostatil:',hajm(a , b ,c))
a:int(input("Width:")
b:int(input("Height:")
c:int(input("Length:")
h:(a*b*c)
print(h)
print("Hi welcome") a = int(input("what is number of length?")) b = int(input("what is number of width?")) c = int(input("what is number of height?")) print("volume of cube is:" , a*b*c)
L = int(input("length: "))
W = int(input("Width : "))
H = int(input("Higher: "))
print(L * W * H, 'The volume of the rectangle')
t=float(input('tool : ')) a=float(input('arz : ')) e=float(input('ertefa : ')) print('volume : tool*arz*ertefa = {} '.format(t*a*e))
print("Hello,this is your program")
class Volume_of_rectangular_cube:
def __init__(self , Volume):
self.Volume = Volume
list = []
txt = input("1.Volume 2.see_list 3.remove_list\n")
try:
while True:
if txt == "1":
a = float(input("Enter width:"))
b = float(input("Enter height:"))
c = float(input("Enter lenght:"))
Volume = ( a * b * c )
list.append(Volume)
print("result is:",Volume)
s = input("Do you want to continue(y|N):")
if s == "y":
txt = input("1.Volume 2.see_list 3.remove_list\n")
else:
if s == "N":
break
if txt == "2":
print(list)
s = input("Do you want to continue(y|N):")
if s == "y":
txt = input("1.Volume 2.see_list 3.remove_list\n")
else:
if s == "N":
break
if txt == "3":
list.remove(Volume)
print(list)
s = input("Do you want to continue(y|N):")
if s == "y":
txt = input("1.Volume 2.see_list 3.remove_list\n")
else:
if s == "N":
break
except:
print("Error")
print("Good bye")
try:
print("This is a volume of traingle program")
class Volume:
def __init__(self , area , environment , volume ):
self.area = area
self.environment = environment
self.volume = volume
def Check_point(self):
if txt == "":
print("Error")
list = []
while True:
txt = input("1.area 2.environment 3.volume 4.list 5.remove_area 6.remove_environment 7.remove_volume n.exit\n")
if txt == "1":
lenght = float(input("Enter lenght of shape(cm):"))
width = float(input("Enter width of shape(cm):"))
area = ( lenght * width )
list.append( area )
print( area )
PI = input("Do you want to Continuation(y|N)\n")
if PI == "y":
txt = input("1.area 2.environment 3.volume 4.list 5.remove_area 6.remove_environment 7.remove_volume n.exit\n")
else:
if PI == "N":
break
if txt == "2":
lenght = float(input("Enter lenght of shape:"))
width = float(input("Enter width of shape:"))
environment = ( lenght + width ) * ( 2 )
list.append( environment )
print( environment )
PI = input("Do you want to Continuation(y|N)\n")
if PI == "y":
txt = input("1.area 2.environment 3.volume 4.list 5.remove_area 6.remove_environment 7.remove_volume n.exit\n")
else:
if PI == "N":
break
if txt == "3":
lenght = float(input("Enter lenght of shape:"))
width = float(input("Enter width of shape:"))
height = float(input('Enter height of shape:'))
volume = ( lenght * width * height )
list.append( volume )
print( volume )
PI = input("Do you want to Continuation(y|N)\n")
if PI == "y":
txt = input("1.area 2.environment 3.volume 4.list 5.remove_area 6.remove_environment 7.remove_volume n.exit\n")
else:
if PI == "N":
break
if txt == "4":
print( list )
if txt == "5":
remove_area = input("Select your item for remove :")
list.remove( area )
print( list )
PI = input("Do you want to Continuation(y|N)\n")
if PI == "y":
txt = input("1.area 2.environment 3.volume 4.list 5.remove_area 6.remove_environment 7.remove_volume n.exit\n")
else:
if PI == "N":
break
if txt == "6":
remove_environment = input("Select your item for remove :")
list.remove( environment )
print( list )
PI = input("Do you want to Continuation(y|N)\n")
if PI == "y":
txt = input("1.area 2.environment 3.volume 4.list 5.remove_area 6.remove_environment 7.remove_volume n.exit\n")
else:
if PI == "N":
break
if txt == "7":
remove_volume = input("Select your item for remove:")
list.remove( volume )
print( volume )
PI = input("Do you want to Continuation(y|N)\n")
if PI == "y":
txt = input("1.area 2.environment 3.volume 4.list 5.remove_area 6.remove_environment 7.remove_volume n.exit\n")
else:
if PI == "N":
break
if txt == "n":
print("Good bye,see you later:)")
break
except:
print("Error,you can try again:)")
tool=int(input("tool: "))
arz=int(input("arz: "))
ertefa=int(input("ertefa: "))
print(tool*arz*ertefa))
x, y, z = input("Enter length, width and height:").split() x , y , z = float(x) , float(y) , float(z) print(x*y*z)
def Volume(): H=int(input('enter height: ')) L=int(input('enter length: ')) W=int(input('enter width: ')) return f'{H*W*L} = Volume of cube' print(Volume())
موادی که موردنیاز است: مدیر سیستم باید بتواند پس از وارد کردن نام کاربری admin و پسورد 12345، وارد شود و کارمند جدید اضافه کند و برای هر کارمند نام کاربری و رمزعبور تعریف کند. برنامه باید این اطلاع...
برنامه ای بنویسید که یک عدد از ورودی دریافت کند و فاکتوریل آن را محاسبه و چاپ کند
برنامه ای بنویس که یک عدد دریافت کند و از اون عدد تا 0 شمارش معکوس انجام دهد بین هر عدد 1 ثانیه مکث نیاز است
لینکی با مشخصات زیر ایجاد کنیدمتن لینک عبارت (اینجا کلیک کنید) باشدلینک به صفحه code-bezan.ir باشدtitle لینک عبارت (تمرین برنامه نویسی) باشدلینک در صفحه جدید باز شود
کد css بنویسید که تمام span هایی که بصورت مستقیم داخل div هستند رو انتخاب کند و رنگ متن آنها را به قرمز تغییر دهد
تابعی بنویسید که یک لیست از اعداد دریافت کند و 2 لیست برای اعداد زوج و فرد آن ایجاد کرده و در خروجی چاپ کند مثالmyfun([1,2,3,4]) output: [1,3] [2,4]
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام
اگه متوجه تمرین نمیشی یا به هر دلیلی نمیتونی حلش کنی، کاملا طبیعیه، اشکالی نداره؛ ناراحت نشو
😊
سعی کن تمرینات آسون تر رو ببینی و جواب های مختلفی که دیگران ارسال کرده اند رو بررسی کنی و
یواش یواش به سراغ تمرینات سخت تر بری.
همچنین ممکنه جوابت درست باشه ولی با سایر جواب ها متفاوت باشه
اگه برنامه نویسی رو هنوز شروع نکردی یا خوب یاد نگرفتی، میتونی از طریق لینک زیر یاد بگیری