1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

"for" com step "float": TypeError: 'float' object cannot be interpreted as an integer

Discussion in 'Technology' started by Rogério Dec, Oct 8, 2018.

  1. Rogério Dec

    Rogério Dec Guest

    Quero fazer um loop de 0 a 100 com step 0.1:

    for x in range(0, 100, 0.1):
    a = cos(radians(x))


    Mas eu recebo este erro:


    TypeError: 'float' object cannot be interpreted as an integer

    Como posso fazer um loop com step float?

    Login To add answer/comment
     

Share This Page