نص شرح المعلم والكود الذي كتبه ونتيجة تشغيله، بنفس ترتيب الدرس.
تمرين
برايك هل الناتج الخاص باول print مثل الاخر ام لا
تمرين
Task: Personal Profile 1. Create a variable for your name. 2. Create a variable for your age. 3. Create a variable for your country. 4. Print all the information using print(). 5. Change the age variable and print its new value. Challenge: Use variables in print() instead of hardcoding the values.
main.py
# ==========================================
# Python for Beginners
# Lecture 5: Variables
# ==========================================
# 1. What is a Variable?
# A variable is a name used to store a value.
# print("Mohamed")
# print(20)
# print(99.9)
name = "Mohamed"
Age = 20
grade = 99.9
# print(name) #Mohamed
# print("name") #name
# print(Age)
score = 50 # player 1
# print(score) # 50
score = score + 10 # 50 + 10 = 60
# print(score)
# 2grade = 6.3
# student-name = "Ali"
# # student_name = "Ali"
# student age = 20
# print(student age)
#Stdent Information
student_name = "Mohamed"
student_age = 21
student_grade = 60
print("Student Name :",student_name)
print("Student Age :",student_age)
print("Student Grade :",student_grade)