Python calculator program 🧮

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024
  • #python #tutorial #code
    operator = input("Enter an operator (+ - * /): ")
    num1 = float(input("Enter the 1st number: "))
    num2 = float(input("Enter the 2nd number: "))
    if operator == "+":
    result = num1 + num2
    print(round(result, 3))
    elif operator == "-":
    result = num1 - num2
    print(round(result, 3))
    elif operator == "*":
    result = num1 * num2
    print(round(result, 3))
    elif operator == "/":
    result = num1 / num2
    print(round(result, 3))
    else:
    print(f"{operator} is not a valid operator")

Комментарии • 122

  • @BroCodez
    @BroCodez  Год назад +88

    operator = input("Enter an operator (+ - * /): ")
    num1 = float(input("Enter the 1st number: "))
    num2 = float(input("Enter the 2nd number: "))
    if operator == "+":
    result = num1 + num2
    print(round(result, 3))
    elif operator == "-":
    result = num1 - num2
    print(round(result, 3))
    elif operator == "*":
    result = num1 * num2
    print(round(result, 3))
    elif operator == "/":
    result = num1 / num2
    print(round(result, 3))
    else:
    print(f"{operator} is not a valid operator")

    • @jocepsi674
      @jocepsi674 Год назад +9

      I just wanted to tell you that please continue uploading courses/ classes ... maybe it won't be too much for you, but because of you and your videos I finally decide to start learning to code. Thank you

    • @seif44
      @seif44 Год назад

      How do it in console like 5+4 give me 9 without make it like this
      5
      Enter
      +
      Enter
      4
      And allow the user to quit or perform another operation

    • @user-cz1fp8qo3n
      @user-cz1fp8qo3n 9 месяцев назад

      bro has a great .pharaoh's first concubine?.

    • @lizk9963
      @lizk9963 8 месяцев назад +1

      operator = input("Enter an operator (+ - * /): ")
      if operator == "+" or operator == "-" or operator == "*" or operator == "/" :
      num1 = float(input("Enter the 1st number: "))
      num2 = float(input("Enter the 2nd number: "))
      if operator == "+":
      result = num1 + num2
      elif operator == "-":
      result = num1 - num2
      elif operator == "*":
      result = num1 * num2
      elif operator == "/":
      result = num1 / num2
      print(round(result, 3))
      else:
      print(f"{operator} is not a valid operator")

    • @dabdab-rg1nm
      @dabdab-rg1nm 3 месяца назад

      tnx so much man

  • @luvsk-rg2xq
    @luvsk-rg2xq Год назад +78

    "I'm not comfortable accepting donations for my work. Rather, I would like to encourage you to donate to a struggling family or a charity of your choosing."
    He really said that.
    Truly a bro we all need.

  • @ERSites
    @ERSites 26 дней назад +5

    Fast way to make with modern python :
    num1 = int(input("Enter 1st number: "))
    num2 = int(input("Enter 2nd number: "))
    calculate = input("Enter + or - or x or / : ")
    match calculate:
    case "+" :
    print("The sum is :", num1 + num2)
    case "-" :
    print("The subtract is :", num1 - num2)
    case "x" :
    print("The product is :", num1 * num2)
    case "/" :
    print("The division is :", num1 / num2)

  • @Theebestest
    @Theebestest 10 месяцев назад +11

    i’d personally prefer it goes like this
    the 1st number, then the operation and then the second number.
    it seems more user friendly, but thank you for the tutorial !

  • @charakamal2000
    @charakamal2000 8 месяцев назад +7

    I never thought of being a coder until I saw your videos, thank you so muck

    • @charakamal2000
      @charakamal2000 8 месяцев назад

      *much*😅

    • @mohammadiaa
      @mohammadiaa 2 месяца назад +1

      @@charakamal2000 there's an edit comment fetus btw

    • @mohammadiaa
      @mohammadiaa 2 месяца назад +1

      feature*

  • @twigginbarrys5548
    @twigginbarrys5548 3 месяца назад +2

    I just started watching your videos yesterday and I wish I had started a long time ago I am having too much fun.
    operator = input("pick and operation (+, -, *, /) ")
    if operator == "+":
    num1 = float(input("what is the first number you would like to add to? "))
    num2 = float(input("what is the second number you would like to add? "))
    result = num1 + num2
    print(f"{num1} plus {num2} equals {(round(result, 3))}")
    elif operator == "-":
    num1 = float(input("what is the first number you would like to subtract from? "))
    num2 = float(input("what is the second number you would like to subtract by? "))
    result = num1 - num2
    print(f"{num1} minus {num2} equals {(round(result, 3))}")
    elif operator == "*":
    num1 = float(input("what is the first number you would like to multiply? "))
    num2 = float(input("what is the second number you would like to multiply by? "))
    result = num1 * num2
    print(f"{num1} multiplied by {num2} equals {(round(result, 3))}")
    elif operator == "/":
    num1 = float(input("what is the first number you would like to divide? "))
    num2 = float(input("what is the second number you would like to divide by? "))
    result = num1 / num2
    print(f"{num1} divided by {num2} equals {(round(result, 3))}")
    else:
    print("INVALID SELECTION! Please try again")

  • @zahranurrohma9220
    @zahranurrohma9220 Год назад +3

    Thank you for the lesson,
    this is what I made today :D
    operator = input("Enter an operator (+ - * /): ")
    valid_operator = list ["+","-","*","/"]
    if operator not in valid_operator:
    print(f"{operator} is not a valid operator")
    exit()
    num1 = float(input("Enter the 1st number: "))
    num2 = float(input("Enter the 2nd number: "))
    if operator == "+":
    result = num1 + num2
    print(round(result, 3))
    elif operator == "-":
    result = num1 - num2
    print(round(result, 3))
    elif operator == "*":
    result = num1 * num2
    print(round(result, 3))
    elif operator == "/":
    result = num1 / num2
    print(round(result, 3))
    else:
    print("")

    • @lm2thed142
      @lm2thed142 6 месяцев назад

      nice use of lists . i wanted to do something like that but was unsure of oding so

    • @anifowosedaniel7515
      @anifowosedaniel7515 19 дней назад

      This won't give the result.
      It will say, it's not a valid operator even after listing the operators when code's been run

  • @Afran146
    @Afran146 11 месяцев назад +11

    This course has been incredible! Thank you!!

  • @Alajmi346
    @Alajmi346 10 месяцев назад +1

    a=input("enter your first numper ")
    a1=input("enter your second numper ")
    s1=int(a)+int(a1)
    s2=int(a)/int(a1)
    s3=int(a)*int(a1)
    s4=int(a)-int(a)
    calcul=input("calcule +,/,*,-")
    if (calcul)=="+": print(s1)
    if (calcul)=="/": print(s2)
    if (calcul)=="*": print(s3)
    if (calcul)=="-": print(s4)

  • @niceballz243
    @niceballz243 Год назад +29

    import math
    print("division (-)")
    print("Addition (+)")
    print("Multiplication (*)")
    print("Division (/)")
    print("Power (**)")
    print("Square roots (sqr)")
    operator = input("Enter one of the operators above: ")
    if operator == "-":
    x = float(input("Enter first value: "))
    y = float(input("Enter a second value: "))
    minus = x - y
    print(f"It is equal: {minus} ")
    elif operator == "*":
    x = float(input("Enter first value: "))
    y = float(input("Enter a second value: "))
    times = x * y
    print(f"It is equal: {times} ")
    elif operator == "/":
    x = float(input("Enter first value: "))
    y = float(input("Enter a second value: "))
    if y == 0 :
    print("You can't divide by zero!!!")
    else:
    times = x / y
    print(f"It is equal: {times} ")
    elif operator == "**":
    x = float(input("Enter first value: "))
    y = float(input("Enter power value: "))
    power = pow(x,y)
    print(f"It is equal: {power} ")
    elif operator == "sqr":
    x = float(input("Enter value you want to square: "))
    sqr = math.sqrt(x)
    print(f"It is equal: {sqr} ")
    else:
    print("Enter a proper operator you dummy!!")

    • @quietus8546
      @quietus8546 Год назад

      lambda better

    • @Devilhunter69
      @Devilhunter69 Год назад

      but importing is out of the syllabus

    • @wowthegoat
      @wowthegoat Год назад +1

      bro wth dont add 50 lines of code for one calculator bruh

    • @wowthegoat
      @wowthegoat Год назад

      if u want to just write a caluclator with functions

    • @everlasting4533
      @everlasting4533 5 месяцев назад

      Basic calculator but messy code 😅

  • @chrishagenstein9956
    @chrishagenstein9956 3 месяца назад +1

    I coded my self and now i know that there is an elseif command
    😊

  • @segujatwaib7033
    @segujatwaib7033 Год назад +1

    it is simple and easy to understand

  • @lookatrobot
    @lookatrobot Год назад +2

    Thank U brother for this Course, I have no words to explain it, btw Your voice is so Cool! 💗

  • @srcafezin
    @srcafezin 22 дня назад

    The tutorial is good, but you also can do: print(eval(input("enter ")))

  • @user-hc6uz9nr2s
    @user-hc6uz9nr2s 7 месяцев назад +1

    a=int(input())
    if a%4==0:
    print("kabisa")
    else:
    print("kabisa emas")

  • @julkarnayenshish1712
    @julkarnayenshish1712 Год назад +12

    I predict,this channel will become more popular than cs50 or freecodecamp or any other coding channels in youtube if this kind of content continues to be uploaded.

    • @Reymax164
      @Reymax164 Месяц назад

      He's already more popular than cs50…
      But codecamp is a whole ahh organization, a single person can't beat a whole org's quantity of courses.

  • @mdarafat..
    @mdarafat.. 25 дней назад

    nice

  • @Curious_Clover
    @Curious_Clover 4 месяца назад

    I feel like there's a shorter code for this. But this is perfect for my simple and straightforward approach for things.

  • @thosan3090
    @thosan3090 Год назад +9

    Can you teach us how to code a calculator program that can calculate the math expression from an input string like 2 * (9 - 16/4), I will very appreciate it sir.

  • @DerSpechtGD
    @DerSpechtGD Месяц назад

    I made this already :^)
    import math
    print("1 = +")
    print("2 = -")
    print("3 = *")
    print("4 = /")
    print("5 = Squareroot")
    print("6 = Power")
    print("7 = Circumference")
    print("8 = Area circle")
    print("9 = Hypotenuse")
    operation = str(input("Choose your operation: "))
    if operation == str(1):
    number1 = float(input("Number 1: "))
    number2 = float(input("Number 2: "))
    result = number1 + number2
    print(f"{number1} + {number2} = {result}")
    elif operation == str(2):
    number1 = float(input("Number 1: "))
    number2 = float(input("Number 2: "))
    result = number1 - number2
    print(f"{number1} - {number2} = {result}")
    elif operation == str(3):
    number1 = float(input("Number 1: "))
    number2 = float(input("Number 2: "))
    result = number1 * number2
    print(f"{number1} * {number2} = {result}")
    elif operation == str(4):
    number1 = float(input("Number 1: "))
    number2 = float(input("Number 2: "))
    result = number1 / number2
    print(f"{number1} / {number2} = {result}")
    elif operation == str(5):
    sqrt = float(input("Enter the number for your squareroot: "))
    result = round(math.sqrt(sqrt), 4)
    print(f"The squareroot of {sqrt} is {round(result, 2)}")
    elif operation == str(6):
    base = float(input("Enter the base: "))
    exp = float(input("Enter the exponent: "))
    result = math.pow(base, exp)
    print(f"{base}^{exp} = {round(result, 2)}")
    elif operation == str(7):
    radius = float(input("Enter the radius: "))
    result = 2 * math.pi * radius
    print(f"The circumference of the circle is: {round(result, 2)}")
    elif operation == str(8):
    radius = float(input("Enter the radius: "))
    result = math.pi * math.pow(radius, 2)
    print(f"The area of the circle is: {round(result, 2)}")
    elif operation == str(9):
    a = float(input("Enter the lenght of side A: "))
    b = float(input("Enter the lenght of side B: "))
    result = math.sqrt(math.pow(a, 2) + math.pow(b, 2))
    print(f"The lenght of the Hypotenuse is: {round(result, 2)}")
    else:
    print("This option is not available!")

  • @vaggelisgeorgiou2491
    @vaggelisgeorgiou2491 2 месяца назад

    I just picked up coding and I absolutely love your tutorials, thank you Bro for all the effort you put in!!
    I have a question. Couldn't we have made only one print( ) in the end of all the if elif else? Something like print(f" {num1} {operator} {num2} = {result} ")
    Wouldn't that work instead of having many print( ) statements for all the steps?

  • @Friday_42
    @Friday_42 2 месяца назад

    That was fun! I was trying to get a statement to print, where if the user input an invalid operator it would print it before asking for num1 & num2. Got to find out what command that is though.

  • @gaddafisuleiman8882
    @gaddafisuleiman8882 Год назад +2

    So happy 😁 you uploaded a video.
    😅 I've been waiting....

  • @Priceygames
    @Priceygames 8 месяцев назад

    Ive learned C++ from your videos, Python is just so easy

  • @sahilpatwary8492
    @sahilpatwary8492 9 месяцев назад

    I have been interested in coding more after I did this code!

  • @Borgcide
    @Borgcide 11 месяцев назад

    I watched all your earlier lessons,
    And i stopped the video and made a calculator by myself,
    I used ×,÷ instead of * and / and your code is also different than me

  • @dents1332
    @dents1332 2 месяца назад +1

    why we cant just:
    else:
    print(operator + " is not a valid operator")

  • @wmstram1
    @wmstram1 Год назад

    Watched it. Liked it.

  • @SubmitterNineteen-zi5nx
    @SubmitterNineteen-zi5nx 10 месяцев назад

    great job. straight to the point

  • @ihatenamez
    @ihatenamez Год назад

    thank you ur tutorials help me a lot

  • @user-ly5we6xl4v
    @user-ly5we6xl4v 9 месяцев назад

    NICELY DONE...❤

  • @Tom-ks9xl
    @Tom-ks9xl 7 месяцев назад

    This is fantastic

  • @PlanarianWorm
    @PlanarianWorm Год назад

    This is my calculator:
    print("""+ is addition
    - is subtraction
    * is multiplication
    / is division
    ** is power
    // is full division
    % is the division's remainder
    """)
    which1 = input("Choose either +, *, /, -, %, // or ** to do your calculation")
    number1 = float(input("First Number: "))
    number2 = float(input("Second Number: "))
    if which1 == '+':
    print(number1 + number2)
    elif which1 == '*':
    print(number1 * number2)
    elif which1 == '/':
    print(number1 / number2)
    elif which1 == '-':
    print(number1 - number2)
    elif which1 == '//':
    print(number1 // number2)
    elif which1 == '%':
    print(number1 % number2)
    elif which1 == '**':
    print(number1 ** number2)
    else:
    print("Invalid Operator")

    • @_KDP
      @_KDP Год назад

      i dont think that would work
      last time i checked you couldnt do print"hello
      boi")
      just saying :D

  • @gamingit1
    @gamingit1 Год назад

    Thanks! You helped me finish my calculator! I used part where you can choose operation and everthing else came out of my brain. Thanks for helping me!

  • @zahraalemi1872
    @zahraalemi1872 7 месяцев назад

    🤩🤩🤩

  • @andreip8351
    @andreip8351 5 месяцев назад

    Calculator
    ------------------------
    number1 = float(input("> 1st number: "))
    number2 = float(input("> 2nd number: "))
    accepted_operators = ["+", "-", "*", "/"]
    operator = input("> operators (+ - * /): ")
    while not operator in accepted_operators:
    print("Incorrect operator!")
    operator = input("> operators (+ - * /): ")
    if operator in accepted_operators:
    break
    if operator == "+":
    print("Result:", number1+number2)
    elif operator == "-":
    print("Result:", number1-number2)
    elif operator == "*":
    print("Result:", number1*number2)
    else:
    print("Result:", number1/number2)
    ------------------------

  • @daydarasensei12
    @daydarasensei12 Год назад +1

    Hey Bro, LOVE YOUR VIDS!! can you tell me which one gives more value? the 12 hours vid or the python for beginners playlist!! PLEASE HELP

  • @Abzarad
    @Abzarad 4 месяца назад

    thanks Bro

  • @perfectionist2994
    @perfectionist2994 Год назад

    Thank you for your video)

  • @currytut455
    @currytut455 2 месяца назад +2

    what happens when you divide 1/0 or some x/0 because i have a major problem in doing the operations when its some number over zero (x/0), can you help me please or maybe someone else in the comment sections who maybe come across such a problem and was able to debug or solve the problem it would be very helpful to me.

    • @Cat-memes_official625
      @Cat-memes_official625 2 месяца назад +1

      Explain your issue again pls

    • @currytut455
      @currytut455 Месяц назад +1

      ​@@Cat-memes_official625When I attempt the operation 1/0 using the Python calculator code, it returns an error message. I struggled to debug this message and wanted the code to print "Undefined" for x/0 division operations rather than an error message. That's all I wanted.

    • @Dinamight77
      @Dinamight77 Месяц назад +1

      @@currytut455 Think about what you've learned about if statements. If num2 is equal to 0, then...

    • @currytut455
      @currytut455 Месяц назад +1

      @@Dinamight77 thanks i used some if statements and it worked, and i learnt a new trick of using try statements also.😁

  • @SouLDYNAMOX9
    @SouLDYNAMOX9 6 месяцев назад

    I made this same program but with area,volume perimeter and arthmetic operation (+ - * / )

  • @wowthegoat
    @wowthegoat Год назад

    You made it a bit simple, maybe next video try to make it with functions, that would be a good video.

  • @zahraalemi1872
    @zahraalemi1872 7 месяцев назад

    😍😍😍

  • @Peyman13822
    @Peyman13822 7 месяцев назад

    thanks

  • @quitefern
    @quitefern Год назад

    operator = input("Enter an operator (+ - * /): ")
    if operator != "+" and operator != "-" and operator != "*" and operator != "/":
    print(operator + " is not a valid operator")
    else:
    num1 = float(input("Enter the 1st number: "))
    num2 = float(input("Enter the 2nd number: "))
    if operator == "+":
    result = num1 + num2
    print(round(result, 3))
    elif operator == "-":
    result = num1 - num2
    print(round(result, 3))
    elif operator == "*":
    result = num1 * num2
    print(round(result, 3))
    elif operator == "/":
    result = num1 / num2
    print(round(result, 3))
    Here is my code where I got rid of the problem of having to enter numbers after not entering a correct operator. I was a little confused because I put or instead of and so I had to put it into ChatGPT to understand what I did wrong but it felt good to come up with this solution.

  • @Kar0lina_Gra
    @Kar0lina_Gra 10 месяцев назад

    Thanks for your video. :D

  • @rdkrdk1094
    @rdkrdk1094 4 месяца назад

    done

  • @Flame_PvP
    @Flame_PvP 8 месяцев назад

    Thanks cool vid helped me out alot
    😃

  • @joncaldwell4753
    @joncaldwell4753 3 месяца назад

    Thank you Bro

  • @micotraspe1435
    @micotraspe1435 3 месяца назад

    How if its like choose a number and the number 1 is
    Addition 2 is subtraction and 3 is multiplication and 4 is division?

  • @pajokamikaze
    @pajokamikaze 26 дней назад

    I think that pizza would be a great operator :c

  • @Zephyr__Edits
    @Zephyr__Edits Год назад

    Bro......... perfect👌

  • @dennisowusu2570
    @dennisowusu2570 7 месяцев назад

    How do you perform the next operation on the next previous calculated answer

  • @runaan7382
    @runaan7382 6 месяцев назад +1

    what are f strings used for? i see them all the time but i dont understand what makes them different from a normal print

    • @demon3769
      @demon3769 3 месяца назад

      in f strings we can insert any variable that we have created without any errors and can perform manipulations easily
      like
      age=12
      if we use print function like
      print(f"the stan is {age} years old)
      in this above line at that age placed in curly bracket will show number 12 if print function is executed

  • @nanzingnanmwa445
    @nanzingnanmwa445 5 месяцев назад

    You're a life saver ❤️

  • @AestheticBlue13
    @AestheticBlue13 Месяц назад

    # CALCULATOR PROGRAM
    operator = input("Enter an operator (+ - * /): ")
    num1 = float(input("Enter the 1st number: "))
    num2 = float(input("Enter the 2nd number: "))
    if operator == "+":
    result = num1 + num2
    print(round(result, 3))
    elif operator == "-":
    result = num1 - num2
    print(round(result, 3))
    elif operator == "*":
    result = num1 * num2
    print(round(result, 3))
    elif operator == "/":
    result = num1 / num2
    print(round(result, 3))
    else:
    print(f"{operator} is not a valid operator :(")
    INPUT
    Enter an operator (+ - * /): +
    Enter the 1st number: 1
    Enter the 2nd number: 1
    OUTPUT
    2.0

  • @Jo-March-Wandering-By
    @Jo-March-Wandering-By 6 месяцев назад

    Huge disadvantage here... what if you want to subtract num2 by num1 instead of num1?

  • @oliispyder
    @oliispyder Год назад

    i did this instead
    num_1 = float(input("Enter Your first number!: "))
    num_2 = float(input("Enter Your second number!: "))
    operator = input("Enter and Operator from /, +, - and *")
    if operator == "*":
    print(f"Your result is: {num_1 * num_2}")
    elif operator == "+":
    print(f"Your result is: {num_1 + num_2} ")
    elif operator == "-":
    print(f"Your result is: {num_1 - num_2} ")
    elif operator == "/":
    print(f"Your result is: {round(num_1 / num_2, 2)} ")
    else:
    print(f"{operator} isnt a valid operator!")

  • @DATGUY87
    @DATGUY87 4 месяца назад

    Hello BroCode, I need a bit of help.
    When I type in the division symbol, nothing comes up but the other operators are fine. I double checked but (/ )was still not working

  • @hunin27
    @hunin27 Год назад

    in this updated code it says: The result is : result instead of just giving the result
    operator = input("Enter an operator (+ - * /): ")
    num1 = float(input("Enter the 1st number: "))
    num2 = float(input("Enter the 2nd number: "))
    if operator == "+":
    result = num1 + num2
    print("The result is: " + (str(round(result, 3))))
    elif operator == "-":
    result = num1 - num2
    print("The result is: " + (str(round(result, 3))))
    elif operator == "*":
    result = num1 * num2
    print("The result is: " + (str(round(result, 3))))
    elif operator == "/":
    result = num1 / num2
    print("The result is: " + (str(round(result, 3))))
    else:
    print(f"{operator} is not a valid operator")

    • @Yumiesthetic
      @Yumiesthetic 11 месяцев назад

      remove the str function lol

  • @noliyeb
    @noliyeb Год назад

    vize_notu = int(input("Vize notunuzu giriniz: "))
    final_notu = int(input("Final notunuzu giriniz: "))
    if 101 > vize_notu > -1:
    num1 = vize_notu
    else:
    print("Geçerli bir vize notu giriniz.")
    if 101 > final_notu > -1:
    num2 = final_notu
    else:
    print("Geçerli bir final notu giriniz.")
    toplam_not = (num1 * 40 / 100) + (num2 * 60 / 100)
    if toplam_not >= 50:
    print(f"Tebrikler! Sınıfı geçtiniz. Notunuz: {toplam_not} ")
    elif toplam_not < 50:
    print(f"Maalesef dersi geçemediniz. Notunuz: {toplam_not}")

  • @TypicalVole2437
    @TypicalVole2437 Год назад

    thank you

  • @kellykou5357
    @kellykou5357 Год назад

    What if the user input a string in temp? What can we add in the if statement?

  • @user-cz1fp8qo3n
    @user-cz1fp8qo3n 9 месяцев назад

    .pharaoh's first concubine?..pharaoh's first concubine?..pharaoh's first concubine?.

  • @97_869
    @97_869 5 месяцев назад

    when i run it and i enter enverything and press enter it closes help

  • @That-one-guy307
    @That-one-guy307 3 месяца назад

    Hey what prgrame software is he using

  • @steev708
    @steev708 Год назад

    Hey, I have a doubt?
    Why can't we "return" the result, instead of print?

  • @hunin27
    @hunin27 Год назад

    At the end you said that unfortunately we still have to type in the numbers, but can't we put the else statement as an if statement and then put an else statement that does nothing?

    • @hunin27
      @hunin27 Год назад

      i wrote this code:
      operator = input("Enter an operator (+ - * /): ")
      num1 = float(input("Enter the 1st number: "))
      num2 = float(input("Enter the 2nd number: "))
      valid_operators = ["+", "-", "*", "/"]
      if operator not in valid_operators:
      print(f"{operator} is not a valid operator")
      elif operator == "+":
      result = num1 + num2
      print(round(result, 3))
      elif operator == "-":
      result = num1 - num2
      print(round(result, 3))
      elif operator == "*":
      result = num1 * num2
      print(round(result, 3))
      elif operator == "/":
      result = num1 / num2
      print(round(result, 3))
      else:
      print("")
      i don't get why you still have to write the numbers before printing the "operator is not a valid operator"

    • @sahtarwars8386
      @sahtarwars8386 8 месяцев назад

      @@hunin27 Not working , shows invalid , why did you use it as a list ? I removed the list and then it worked.

    • @hunin27
      @hunin27 8 месяцев назад

      no way. bro this comment was 7 months ago. i am a front end dev now. :)@@sahtarwars8386

  • @vovanosa2827
    @vovanosa2827 Год назад +26

    bruh the python console💀💀

  • @JOJO77TRUE
    @JOJO77TRUE 11 месяцев назад

    lindo

  • @przemek4574
    @przemek4574 11 месяцев назад

    Mine calculator is better:
    print(eval(input("Calculator")))

  • @felaps
    @felaps 10 месяцев назад

    what can i do if i want once the operation is made to ask again for the operation?

  • @emmanuelgibson6657
    @emmanuelgibson6657 Год назад

    Thank you guys

  • @bekturasanbekov1979
    @bekturasanbekov1979 Год назад

    thx 4 vid bro !

  • @drewplays9007
    @drewplays9007 Год назад

    first

  • @DarkTemplarKain
    @DarkTemplarKain 9 месяцев назад

    by any chance could you tell me how to find this version of python? having a hard time finding it for whatever reason.

    • @Jo-March-Wandering-By
      @Jo-March-Wandering-By 6 месяцев назад +1

      It's Pycharm. Don't know the version of Pycharm he uses.

    • @DarkTemplarKain
      @DarkTemplarKain 6 месяцев назад

      @@Jo-March-Wandering-By thank you, i appreciate it.

  • @wilfredomina2301
    @wilfredomina2301 11 месяцев назад

    it says Syntax error at line 2 of your code: invalid syntax

  • @failforwardfast8609
    @failforwardfast8609 3 месяца назад

    Thank you BC!

  • @codeowlhnko
    @codeowlhnko Год назад

    Please what app are you using?

  • @Bry858
    @Bry858 2 месяца назад

    OK the program im using is not working but it is not your fault but idk what to do

  • @markusscvilikovskis9051
    @markusscvilikovskis9051 Год назад

    Why are you reuploading?

  • @vipergenix8839
    @vipergenix8839 10 месяцев назад

    But how do I loop it😢