Warning: mkdir(): No space left on device in /var/www/tgoop/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/t3lampython/--): Failed to open stream: No such file or directory in /var/www/tgoop/post.php on line 50
learn python { تعلم بايثون }@t3lampython P.75
T3LAMPYTHON Telegram 75
#الدرس الثالث
3.3
*شرح int مع دالة input *
شرح اليوم سوف يكون أول كود عملي
*مهمة الكود حساب العمر* الكود 👇

#code

#English version

birth_year = int(input("Please enter your birth year:\n"))
current_year = 2023
age = current_year - birth_year
print("You are", age, "years old")

#arabic version

birth_year = int(input("من فضلك، أدخل سنة ميلادك: "))
current_year = 2023
age = current_year - birth_year
print("عمرك هو:", age)


#code end

شرح الكود :

**الخطوة 1: استقبال إدخال المستخدم
نستخدم الدالة
input()
لاستقبال إدخال المستخدم. في هذا المثال، سنطلب من المستخدم إدخال سنة ميلاده.

birth_year = int(input("من فضلك، أدخل سنة ميلادك: "))

*الخطوة 2: تحويل الإدخال إلى عدد صحيح
نحتاج إلى تحويل الإدخال الذي تم استقباله (الذي هو نص) إلى عدد صحيح باستخدام الدالة
int()

*الخطوة 3: حساب العمر
نقوم بحساب العمر باستخدام السنة الحالية current_year
و سنة الميلاد التي قام المستخدم بإدخالها. هنا، نقوم بطرح سنة الميلاد من السنة الحالية.

current_year = 2023

age = current_year - birth_year

*الخطوة 4: عرض الناتج
نستخدم الدالة
print()
لعرض العمر الذي تم حسابه.

print("عمرك هو:", age)

بهذا الكود، إذا أدخل المستخدم سنة ميلاده، سيتم حساب العمر وعرضه على الشاشة .

#note
لسه على pdf نخلص الدرس الثالث ونعمل pdf


www.tgoop.com/t3lampython
1



tgoop.com/t3lampython/75
Create:
Last Update:

#الدرس الثالث
3.3
*شرح int مع دالة input *
شرح اليوم سوف يكون أول كود عملي
*مهمة الكود حساب العمر* الكود 👇

#code

#English version

birth_year = int(input("Please enter your birth year:\n"))
current_year = 2023
age = current_year - birth_year
print("You are", age, "years old")

#arabic version

birth_year = int(input("من فضلك، أدخل سنة ميلادك: "))
current_year = 2023
age = current_year - birth_year
print("عمرك هو:", age)


#code end

شرح الكود :

**الخطوة 1: استقبال إدخال المستخدم
نستخدم الدالة
input()
لاستقبال إدخال المستخدم. في هذا المثال، سنطلب من المستخدم إدخال سنة ميلاده.

birth_year = int(input("من فضلك، أدخل سنة ميلادك: "))

*الخطوة 2: تحويل الإدخال إلى عدد صحيح
نحتاج إلى تحويل الإدخال الذي تم استقباله (الذي هو نص) إلى عدد صحيح باستخدام الدالة
int()

*الخطوة 3: حساب العمر
نقوم بحساب العمر باستخدام السنة الحالية current_year
و سنة الميلاد التي قام المستخدم بإدخالها. هنا، نقوم بطرح سنة الميلاد من السنة الحالية.

current_year = 2023

age = current_year - birth_year

*الخطوة 4: عرض الناتج
نستخدم الدالة
print()
لعرض العمر الذي تم حسابه.

print("عمرك هو:", age)

بهذا الكود، إذا أدخل المستخدم سنة ميلاده، سيتم حساب العمر وعرضه على الشاشة .

#note
لسه على pdf نخلص الدرس الثالث ونعمل pdf


www.tgoop.com/t3lampython

BY learn python { تعلم بايثون }




Share with your friend now:
tgoop.com/t3lampython/75

View MORE
Open in Telegram


Telegram News

Date: |

Hashtags are a fast way to find the correct information on social media. To put your content out there, be sure to add hashtags to each post. We have two intelligent tips to give you: As five out of seven counts were serious, Hui sentenced Ng to six years and six months in jail. Administrators During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content. The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously.
from us


Telegram learn python { تعلم بايثون }
FROM American