BerkayB.2000
Centipat
- Katılım
- 11 Ağustos 2020
- Mesajlar
- 43
Python:
sugar=0.03125
butter=0.021
flour=0.060
cookienumber=print(int(input("enter number of cookies: ")))
calculate1=0.03125 * cookienumber
calculate2=0.021 * cookienumber
calculate3=0.060 * cookienumber
print(" you need {} cups of sugar, {} cups of butter, and {} cups of flour.".format(calculate1,calculate2,calculate3))
Merhabalar. Ben bu örnekte kullanıcıdan aldığım int girişini calculate1,calculate2 ve calculate3 değişkenlerinde işleme koymak istiyorum da galiba bir yerde yanlış yapıyorum ve Nonetype hatası alıyorum. Nasıl düzeltebilirim?