elz: (ada-tubes)
[personal profile] elz posting in [community profile] intro_to_cs
Post and discuss your answers in the comments! (And yay for everybody who posted problem set 1 answers!)

Date: 2009-11-23 03:21 am (UTC)
bellerina: (Default)
From: [personal profile] bellerina
Does anyone know if there is a limit to how many indentations/levels of nested loops is viable in Python? I'm having an issue with problem 3 in that my nested loops work fine until I add another while loop outside of them, and I can't figure out why.

Date: 2009-11-23 04:14 am (UTC)
gchick: Small furry animal wearing a tin-foil hat (Default)
From: [personal profile] gchick
There's no limit. Maybe if you posted a code snippet, someone might be able to spot something that you're not seeing?

(edit: on further research, I'm seeing a couple of references to limits between 20 and several hundred layers of indentation -- I'm not sure if the varying numbers are different versions or implementations or what, but even if it's 20, it's *way* more than anything you'd find in these problem sets, and possibly any sane software design.)
Edited Date: 2009-11-23 04:30 am (UTC)

Profile

Introduction to Computer Science

July 2010

S M T W T F S
    123
45678910
11121314151617
18192021222324
2526272829 3031

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 14th, 2025 10:04 am
Powered by Dreamwidth Studios