बधाई हो!

डेवलपर्स के लिए Python परिचय

Jasmin Ludolf

Senior Data Science Content Developer

अध्याय 1 का पुनरावलोकन

# मात्रा परिभाषित करें
quantity = 10

# सिंगल quotes ingredient_name = 'pasta'
# डबल quotes भी चलती हैं ingredient_name = "pasta"
डेवलपर्स के लिए Python परिचय

अध्याय 2 का पुनरावलोकन

ingredient_name = "Basil Leaves"


# लोअरकेस में बदलें ingredient_name = ingredient_name.lower()
# ingredients की लिस्ट
ingredients = ["pasta", "tomatoes", "garlic",
               "basil", "olive oil", "salt"]

# पहले index का मान लें ingredients[0]
# एक dictionary बनाएँ
recipe_dict = {"pasta": 500,
               "tomatoes": 400, 
               "garlic": 15,
               "basil": 20, 
               "olive oil": 30,
               "salt": 5}
# एक set बनाएँ
ingredients_set = {"pasta", "tomatoes", "pasta", 
                   "basil", "garlic", "olive oil",
                   "salt"}

# एक tuple बनाएँ serving_sizes = (1, 2, 4, 6, 8)
डेवलपर्स के लिए Python परिचय

अध्याय 3 का पुनरावलोकन

Operator Function
== बराबर
!= बराबर नहीं
> से अधिक
>= से अधिक या बराबर
< से कम
<= से कम या बराबर
Keyword Function Use
if शर्त सही हो तो workflow का पहला चरण
elif नहीं तो, अगली शर्त जाँचें if के बाद
else नहीं तो, यह करें elif के बाद
डेवलपर्स के लिए Python परिचय

अध्याय 3 का पुनरावलोकन

# ingredients की लिस्ट
ingredients = ["pasta", "tomatoes", "garlic", "basil", "olive oil", "salt"]


# loop चलाकर हर ingredient प्रिंट करें for ingredient in ingredients:
print(ingredient)
pasta
tomatoes
garlic
basil
olive oil
salt
डेवलपर्स के लिए Python परिचय

अध्याय 3 का पुनरावलोकन

ingredients_to_add = 5
items_added = 0

while items_added < ingredients_to_add:
    items_added += 1
    remaining = ingredients_to_add - items_added

    if remaining > 3:
        print("कई ingredients बाकी हैं")
    elif remaining >= 1:
        print("लगभग हो गया!")
    else:
        print("शॉपिंग लिस्ट पूरी!")
डेवलपर्स के लिए Python परिचय

अध्याय 3 का पुनरावलोकन

Keyword Function
and जाँचें कि कई शर्तें सही हैं
or जाँचें कि एक या अधिक शर्तें सही हैं
in जाँचें कि कोई मान data structure में है
not जाँचें कि कोई मान data structure में नहीं है

 

  • list.append()
डेवलपर्स के लिए Python परिचय

अगले कदम

  • अतिरिक्त built-in functions

    • zip()
    • enumerate()
  • Packages और modules

    • os
    • time
    • venv
    • pandas
    • requests
    • numpy
  • कस्टम functions बनाना

$$

  • DataCamp पर Intermediate Python for Developers कोर्स
डेवलपर्स के लिए Python परिचय

बधाई हो!

डेवलपर्स के लिए Python परिचय

Preparing Video For Download...