• Cursos
  • Compilador de Código
  • Debatir
  • Precios
  • Teams
Menu
- 1

Why is the result 17

var result = 0; for i in 0...4 { if i == 3 { result += 10; } else { result += i; } } print(result)

loopsifi==
5th Feb 2022, 1:12 AM
Daniel
2 Respuestas
+ 1
Thank you devanille
5th Feb 2022, 4:44 PM
Daniel

¿Tienes a menudo preguntas como esta?

Aprende gratis de forma más eficaz

  • Introducción a Python

    7,1M de estudiantes

  • Introducción a Java

    4,7M de estudiantes

  • Introducción a C

    1,5M de estudiantes

  • Introducción a HTML

    7,5M de estudiantes

Ver todos los cursos
En tendencia hoy
Functions in python
2 Votes
How to make a playground
1 Votes
How can you find whether a number is odd or even in a different way(other than (x%2==0))?
1 Votes
I need advice
1 Votes
Html 5 document question
1 Votes
this query always result to be incorrect from Sorting Data lesson
1 Votes
Python
0 Votes
𝙵𝙸𝙽𝙳 𝚃𝙷𝙴 𝙸𝙽𝙿𝚄𝚃 𝙾𝙵 𝚃𝙷𝙴 𝙿𝚁𝙾𝙶𝚁𝙰𝙼
1 Votes
Can someone explain inline and block elements please
0 Votes
Can you tell what is wrong with the code
0 Votes