ما مشكله الكود يقول في السطر 6

str_lenght= input(“please type lenght:\n”)
str_wigh=input(“please type widht:\n”)
str_price=input(“how much for 1 metar?\n”)

lenght =float(str_lenght)
wight=float(str_wight)
price =float(str_price)

area=lenghtwidht
total_price=price
area

str_area=str(area)
str_total_price=str(total_price)

print(“the total area is:”+str_area)
print(“give the guy:$”+str_total_price)

إعجابَين (2)

صحيح الخطأ في السطر 6 لأنك في السطر السادس كتبت wight = float (str_wight)
ولاكنك فى السطر الثاني كتبت :
str_wigh=input ("please type wight")
بدلا من :
str_wight=input ("please type wight")
فانت في السطر الثاني كتبت اسم المتغير :
str_wigh بدلا من str_wight

ثانيا :
فى السطرين 9 و 10 نسيت وضع علامه الضرب (*)

اليك الكود المصحح :

str_lenght= input("please type lenght:\n")
str_wight=input("please type wight:\n")
str_price=input("how much for 1 metar?\n")

lenght =float(str_lenght)
wight=float(str_wight)
price =float(str_price)

area=lenght*wight
total_price=price*area

str_area=str(area)
str_total_price=str(total_price)

print("the total area is:"+str_area)
print("give the guy:$"+str_total_price)

بالتوفيق :rose:

إعجاب واحد (1)

انت مش عامل اي عملية حسابية في السطر السادس والسابع

إعجابَين (2)