* Scott Dunning <swdunn...@me.com> [2014-03-30 18:37]: > Without out a break or placing that 10 in there I can’t think of a way > to have the while loop stop once it reaches (n). Any hints?
As discussed already, you can't use fixed values (ie, you don't know that 10 is always going to be there). > def print_n(s, n): > > while n <= 10: > > print s > > n = n + 1 > > So, instead of while n <= 10: Think about: while something <= n: and changing something and retesting. -- David Rock da...@graniteweb.com _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor