• Kurse
  • Code Compiler
  • Diskutieren
  • Preise
  • Teams
Menu
0

why i get 6 can someone help me

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

pythoncodehelpme
16th Nov 2020, 8:07 AM
pyae phyo
pyae phyo - avatar
1 Antwort
+ 4
https://www.sololearn.com/Discuss/1797467/?ref=app
16th Nov 2020, 8:38 AM
Simba
Simba - avatar

Häufig solche Fragen?

Effizienter lernen, kostenlos:

  • Einführung in Python

    7.1M Lernende

  • Einführung in Java

    4.7M Lernende

  • Einführung in C

    1.5M Lernende

  • Einführung in HTML

    7.5M Lernende

Alle Kurse anzeigen
Heute heiß
Need a personal tutor
1 Votes
I can't figure out how to use the getElementById code in JavaScript Code Playground, I've tried multiple times and watched YT
0 Votes
Fix code
0 Votes
..
1 Votes
How can I turn my .py files to .exe files?
1 Votes
Software to write and run codes
1 Votes
Add lua
0 Votes
How Much RAM is Required for Object Detection Project
0 Votes
Beginner_to_SoloLearn
1 Votes
How to learn C++ and how long does it take
1 Votes