Master Python Operators: Comprehensive Guide with Examples | Python for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 11

  • @Ralphie_1376
    @Ralphie_1376 4 หลายเดือนก่อน

    var = (8 + 2) // 4 * (9 % 3)
    print(var) = 0
    # 1. Parenthesis = (8 + 2) = 10
    # 2. Parenthesis = (9 % 3) = 0
    # 3. Floor Division = 10 // 4 = 2
    # 4. Multiplication = 2 * 0 = 0
    var1 = 2 ** 3 + 5 // 2 - 10 % 3
    print(var1)
    # 1. Exponentiation = 2 ** 3 = 8
    # 2. Floor Division = 5 // 2 = 2
    # 3. Addition = 8 + 2 = 10
    # 4. Modulo = 10 % 3 = 1
    # 5. Subtraction = 10 - 1 = 9
    var2 = (10 + 5) * (8 - 4) / 2
    print(var2) = 30.0
    # 1. Bracket = (10 + 5) = 15
    # 2. Bracket = (8 - 4) = 4
    # 3. Division = 4 / 2 = 2
    # 4. Multiplication = 15 * 2 = 30.0
    var3 = 2 ** 3 + (15 // 4) * 2 - 10 % 3
    print(var3) = 13
    # 1. Bracket = (15 // 4) = 3
    # 2. Exponentiation = 2 ** 3 = 8
    # 3. Multiplication = 3 * 2 = 6
    # 4. Addition = 8 + 6 = 14
    # 5. Modulo = 10 % 3 = 1
    # 6. Subtraction = 14 - 1 = 13
    var4 = (5 + 2 * 3) ** 2 - (10 // 3) % 2
    print(var4) = 120
    # 1. Bracket = (5 + 2 * 3) = (5 + 6) = 11
    # 2. Bracket = (10 // 3) = 3
    # 3. Exponentiation = 11 ** 2 = 121
    # 4. Modulo = 3 % 2 = 1
    # 5. Subtraction = 121 - 1 = 120
    var5 = 25 / (5 - 2) + (18 % 4) * (7 // 2)
    print(var5) = 14.3333
    # 1. Bracket = (5 - 2) = 3
    # 2. Bracket = (18 % 4) = 2
    # 3. Bracket = (7 // 2) = 3
    # 4. Division = 25 / 3 = 8.33333
    # 5. Multiplication = 2 * 3 = 6
    # 6. Addition = 8.3 + 6 = 14.33333
    var6 = ((12 + 5) * 4 - 18) // 3 % 5
    print(var6) = 1
    # 1. Bracket = (12 + 5) = 17
    # 2. Multiplication = 17 * 4 = 68
    # 3. Subtraction = 68 - 18 = 50
    # 4. Floor Division = 50 // 3 = 16
    # 5. Modulo = 16 % 5 = 1

    • @TechWithJaja
      @TechWithJaja  4 หลายเดือนก่อน

      You're on track, @Ralphie but you're having mistakes with prioritizing the Addition over the Modulo. The Modulo is a type of division and must come before addition or subtraction.
      Nice try 😉 💯

  • @mauradappa4417
    @mauradappa4417 4 หลายเดือนก่อน

    Answers
    Solve1=2**3+5//2-10%3
    print(Solve1)
    Expo=8+5//2-10%3
    Divide =8+2-10%3
    Modulus=8+2-1
    Add=10-1
    Subtract=9
    Solve2=(10+5)*(8-4)/2
    print(Solve2)
    Bracket=15*4/2
    Divide=15*2.0
    Multiply=30.0
    Solve3=2**3+(15//4)*2-10%3
    print(Solve3)
    Bracket=2**3+3*2-10%3
    Expo=8+3*2-10%3
    Multiply=8+6-10%3
    Add=14-10%3
    Modulus=14-1
    Sub=13
    Solve4=(5+2*3)**2-(10//3)%2
    print(Solve4)
    Bracket=11**2-3%2
    Expo=121-1
    Sub =120

    • @TechWithJaja
      @TechWithJaja  4 หลายเดือนก่อน

      You're on point, @maura.
      Keep it up 💪💯

  • @AlbertAsuquo-rl3xr
    @AlbertAsuquo-rl3xr 4 หลายเดือนก่อน

    2 result =2**3+5//2-10%3
    E=2**3=8
    D=5//2=2
    M=10%3=1
    A=8+2=10
    S=10-1=9
    Results =9
    3 result = (10+5)*(8-4)/2
    B=(10+5)=15
    B=(8-4)=4
    D=4/2=2.0
    M=15*2.0= 30.0
    Results =30.0
    4 result =2**3+(15//4)*2-10%3
    B=(15//4)=3
    E=2**3=8
    M=10%3=1
    M=3x2=6
    A=8+6=14
    S=14-1=1
    Results =13

    • @TechWithJaja
      @TechWithJaja  4 หลายเดือนก่อน

      You're on point 💯

  • @Ralphie_1376
    @Ralphie_1376 4 หลายเดือนก่อน

    i can not hear any audio

    • @TechWithJaja
      @TechWithJaja  4 หลายเดือนก่อน

      Are you serious?
      Who else is experiencing this?

    • @Ralphie_1376
      @Ralphie_1376 4 หลายเดือนก่อน

      @@TechWithJaja All sorted