• Cursos
  • Compilador de Código
  • Discutir
  • Preços
  • Teams
Menu
0

result is 0 but how?

print(int((2**4-6)/2)-5)

pytho
15th Aug 2022, 6:21 AM
Sojib Mia
Sojib Mia - avatar
1 Resposta
+ 5
Sojib 2**4 = 16 16 - 6 = 10 10 / 2 = 5.0 int(5.0) = 5 5 - 5 = 0
15th Aug 2022, 6:23 AM
A͢J
A͢J - avatar

Costuma ter perguntas como essa?

Aprenda de maneira mais eficiente, de graça:

  • Introdução ao Python

    7.1M de alunos

  • Introdução ao Java

    4.7M de alunos

  • Introdução ao C

    1.5M alunos

  • Introdução ao HTML

    7.5M alunos

Ver todos os cursos
Quente hoje
How can I print a Python set so it looks clean (no {} brackets or quotes)?
2 Votes
Where make_unique is better than unique_ptr(raw pointer)
0 Votes
Can someone help and explain better on slicing
1 Votes
How do I remove duplicates from a list but keep the order?
0 Votes
Best way to learn a new programming language fast?
1 Votes
How do I print a multiplication table neatly?
0 Votes
Any help with custom functions?
2 Votes
Why we use return in function ?
0 Votes
Alphabetically sorting
0 Votes
Will i land a job
0 Votes