• Курсы
  • Компилятор кода
  • Обсуждения
  • Цены
  • Teams
Menu
0

why the output is 6

def func(x): res = 0 for i in range(x): res += i return res print(func(4))

python
24th Apr 2020, 2:31 PM
Heng Ty
Heng Ty - avatar
1 ответ
+ 1
0+1+2+3=?
24th Apr 2020, 2:38 PM
Abhay
Abhay - avatar

Часто задают такие вопросы?

Учитесь эффективнее, бесплатно:

  • Введение в Python

    7.1M учащихся

  • Введение в Java

    4.7M учащихся

  • Введение в C

    1.5M учащихся

  • Введение в HTML

    7.5M учащихся

Смотреть все курсы
Актуальное сегодня
Hello can anyone help me to learn gdscript
0 Votes
What coding language should i use to make a custom coding language?
0 Votes
Anyone Learning Godot?
1 Votes
hello world i need help
2 Votes
Any easy game ideas for beginners?
0 Votes
Which is more important CSS vs HTML vs JS?
1 Votes
How many courses are there on Sololearn
1 Votes
hi
1 Votes
Which databases are the best at injecting dynamic data within websites, and how can you achieve it?
0 Votes
How to increase My Level is SoloLearn ?
0 Votes