Python Functions: Return Values, Scope, and Managing Side Effects
Understand the critical difference between using return values and modifying global variables to write clear, predictable, and maintainable Python code.
-
💬
مدرب ذكاء اصطناعي
اسأل عن أي درس واحصل على إجابة واضحة فورًا، في أي وقت. -
🕐
ابدأ في أي وقت
بلا جداول أو مواعيد نهائية — تعلّم بوتيرتك، وقتما يناسبك. -
🌐
بالعربية
الدروس والمهام والشهادة — كل ذلك بلغتك بالكامل.
حول هذه الدورة
Writing reliable Python code depends heavily on how you manage data flow within functions. Confusing state changes and unpredictable behavior often stem from poorly managed scope and reliance on global variables.
This course provides a foundational understanding of function design principles in Python. You will learn how to structure functions that communicate their results clearly using return values, effectively minimizing confusing side effects and improving code testability and readability.
What you'll learn:
* Understand the concepts of local, enclosing, and global scope in Python.
* Define and utilize Python functions that consistently return values for predictable outcomes.
* Analyze and identify function side effects, including when and how to safely interact with global state.
* Apply best practices for function design, favoring pure functions where appropriate.
* Practice using modern Python type hints to clearly document expected inputs and outputs.
The course begins with essential terminology regarding variable scope and state management, then moves into practical comparisons of functions that return data versus functions that modify state. You will solidify your understanding through written examples and exercises.
This course is designed for beginner Python programmers who are learning how to structure their first programs. No prior advanced knowledge of software design patterns is required.
Start mastering functional clarity in your Python code today.
ما الذي ستحصل عليه
-
📜
شهادة إتمام
أضفها إلى ملفك على LinkedIn -
💬
مدرّس AI شخصي
عالق في دورة؟ اسأل مدرّسك المدمج أي شيء، في أي وقت. -
🎧
النسخة الصوتية مضمَّنة
تعلَّم أثناء تنقُّلك — دون شاشة -
♾️
وصول مدى الحياة
عُد متى شئت، بلا انتهاء -
📱
الهاتف أو الكمبيوتر
يعمل في أي مكان وعلى أي جهاز -
💸
استرداد خلال 14 يومًا
دون أسئلة -
⚡
قصير ومركَّز
2 ساعة 42 دقيقة من المحتوى التطبيقي
المراجعات
لا توجد مراجعات بعد — كن أول من يشارك تجربته.
الأسئلة الشائعة
ما الذي أحتاجه لأخذ هذه الدورة؟ +
يكفي هاتف أو كمبيوتر متصل بالإنترنت. بدون تثبيتات أو أجهزة خاصة.
كيف يمكنني الدفع؟ +
بالبطاقة عبر Stripe. لا نخزن بيانات البطاقة — يتولى Stripe ذلك بأمان.
هل يمكنني استرداد المال؟ +
نعم — استرداد كامل خلال 14 يومًا، دون أسئلة.
إلى متى يستمر وصولي؟ +
إلى الأبد. بمجرد الشراء، الدورة لك تعود إليها متى شئت.
هل سأحصل على شهادة؟ +
نعم. عند الإتمام ستحصل على شهادة يمكنك إضافتها إلى ملفك في LinkedIn.
مصمَّم للعاملين في
التقنية
التصميم
المالية
التسويق
الرعاية الصحية
التعليم
الضيافة
التصنيع
×2
اشحن مرة واحدة وادفع النصف
أضف 90 € واحصل على 200 رصيد، بحيث تكلف كل دورة حوالي 11,25 €. لا تنتهي صلاحية الأرصدة أبداً.
90 €
200 رصيد
11,25 € / دورة
أفضل قيمة
230 €
550 رصيد
10,45 € / دورة
460 €
1200 رصيد
9,58 € / دورة
الرصيد يصلح لأي دورة ولا ينتهي.