1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python problems with division

Discussão em 'Python' iniciado por Stack, Agosto 2, 2025.

  1. Stack

    Stack Membro Participativo

    I've been attempting to make a calculator where you enter a number then the calculator divides it by 10 then times it by 4 to work out 40%, then prints the final number.

    a = input("Enter amount: ")
    b = a / 10
    c = b * 4
    print(c)


    When I run the code I receive this error message: TypeError: unsupported operand type(s) for /: 'str' and 'int'

    Continue reading...

Compartilhe esta Página