BaşlayınÜcretsiz Başlayın

Building a list

Now that you understand how lists work in Python, it's time to build the foundation of your recipe scaler project! You'll create lists to store the ingredients and their quantities in grams.

Bu egzersiz

Introduction to Python for Developers

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a list called ingredients containing the following strings: "fusilli", "tomatoes", "garlic", "basil", "olive oil", and "salt", in that order.
  • Create a list called quantities containing the following numbers: 500, 400, 15, 20, 30, and 10, in that order.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create a list of ingredients
ingredients = ____

# Create a list of ingredient quantities
quantities = ____

print(ingredients)
print(quantities)
Kodu Düzenle ve Çalıştır