Basic Arithmetic Operators

جارٍ التحميل…

01 / ملخص الدرس

Basic Arithmetic Operators

ضمن مساربايثون للمبتدئين08 / 08
02 / شرح الدرس مكتوبًا

نص شرح المعلم والكود الذي كتبه ونتيجة تشغيله، بنفس ترتيب الدرس.

main.py
# ==========================================
# Python for Beginners
# Lecture 8: Basic Arithmetic Operators
# ==========================================

# Lecture Contents:
# 1. What Are Arithmetic Operators?
# 2. Addition (+)
# 3. Subtraction (-)
# 4. Multiplication (*)
# 5. Division (/)
# 6. Practical Examples
# 7. Practice Task

# ==========================================

number1 = 5
number2 = 10 

# print(number1+number2)

# 2. Addition (+)

number1 = 5
number2 = 10 

# print(number1+number2)

# 3. Subtraction (-)

number1 = 50
num2 = 10

# print(number1-num2)# 50 - 10 = 40

# 4. Multiplication (*)

number1 = 50
num2 = 10

print(num2*number1) # 10 * 50 = 500

# 5. Division (/)

num1 = 60 
num3 = 12

print(num1/num3) # 60 /12 = 5

#Store

product1 =100
product2 =105
product3 =400

budget = 1000

total_price = product1+product2+product3
remaing_money = budget-total_price

print("Total Price:",total_price) # 100 + 105 +400 = 605
print("Remaning Money:",remaing_money) #1000 - 605 = 395
03 / دروس المسار (8)
  1. 01Introduction
  2. 02Print
  3. 03Comments
  4. 04Type of data
  5. 05Variables
  6. 06Data Types
  7. 07Type Casting
  8. 08Basic Arithmetic Operatorsانت هنا