🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Philip Schultz
    Philip Schultz
    11,437 Points

    Can you have multiple conditions in while loops?

    Posted March 23, 2018 12:01am by Philip Schultz
    Philip Schultz
    11,437 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Mengqi Liu
    Mengqi Liu
    875 Points

    While Loop: example Countdown

    Posted February 18, 2018 8:49pm by Mengqi Liu
    Mengqi Liu
    875 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    4 Answers

  • Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points

    When did we define the variable "word"?

    Posted September 21, 2017 6:29am by Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Albert Lee
    PLUS
    Albert Lee
    Courses Plus Student 1,372 Points

    why when I use while loop , the variable in it can't be 0?

    Posted August 15, 2017 2:56am by Albert Lee
    Albert Lee
    Courses Plus Student 1,372 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Mateusz Cybulski
    Mateusz Cybulski
    2,469 Points

    Why doesn't the while loop keep going?

    Posted August 13, 2017 11:43pm by Mateusz Cybulski
    Mateusz Cybulski
    2,469 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • ryan smith
    ryan smith
    687 Points

    Problem --> for name in names:

    Posted August 9, 2017 5:40pm by ryan smith
    ryan smith
    687 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Kevin Smith
    Kevin Smith
    766 Points

    How does python know what "number (or 'num')" is when writing a loop?

    Posted June 6, 2017 1:52am by Kevin Smith
    Kevin Smith
    766 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    3 Answers

  • Enzo Cnop
    Enzo Cnop
    5,157 Points

    Mystery Variable 'word' in first example.

    Posted May 3, 2017 8:34pm by Enzo Cnop
    Enzo Cnop
    5,157 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • sarwesh gajbhiye
    sarwesh gajbhiye
    387 Points

    why we put indentation before print()

    Posted April 19, 2017 7:09am by sarwesh gajbhiye
    sarwesh gajbhiye
    387 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    3 Answers

  • Mohammed Naffa
    Mohammed Naffa
    390 Points

    Cant know.

    Posted April 11, 2017 3:29pm by Mohammed Naffa
    Mohammed Naffa
    390 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Subramanian K
    Subramanian K
    3,103 Points

    For loop doubt

    Posted April 5, 2017 3:51pm by Subramanian K
    Subramanian K
    3,103 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Rakshith Nayak
    Rakshith Nayak
    1,893 Points

    In this video at 5:03 how is start going to become false at some point?

    Posted January 25, 2017 6:46pm by Rakshith Nayak
    Rakshith Nayak
    1,893 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Davide Fazio
    Davide Fazio
    952 Points

    While loop example

    Posted December 9, 2016 10:40pm by Davide Fazio
    Davide Fazio
    952 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • wpnawzshaq
    wpnawzshaq
    861 Points

    for loop is not block!

    Posted December 3, 2016 8:47pm by wpnawzshaq
    wpnawzshaq
    861 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Sun Min
    Sun Min
    2,941 Points

    when do we use quotation marks?

    Posted December 1, 2016 5:48pm by Sun Min
    Sun Min
    2,941 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • fahad lashari
    fahad lashari
    7,693 Points

    How do I get rid off this ANNOYING overtyping in the console. It's not being caused by the insert button.

    Posted November 27, 2016 4:39pm by fahad lashari
    fahad lashari
    7,693 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Juan Prada
    Juan Prada
    4,429 Points

    i need help with this challege

    Posted October 5, 2016 7:21pm by Juan Prada
    Juan Prada
    4,429 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Genry Sats
    Genry Sats
    3,938 Points

    Question about while loop

    Posted October 3, 2016 9:51am by Genry Sats
    Genry Sats
    3,938 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Jeffrey Lee
    Jeffrey Lee
    493 Points

    While loop & continue

    Posted October 1, 2016 11:21am by Jeffrey Lee
    Jeffrey Lee
    493 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Luke Bennett
    Luke Bennett
    10,265 Points

    While loops - Around and Around Tutorial

    Posted September 29, 2016 5:41pm by Luke Bennett
    Luke Bennett
    10,265 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Mariya Shklyar
    Mariya Shklyar
    1,022 Points

    Loops and if conditions if num % 2 == 0

    Posted August 18, 2016 1:02pm by Mariya Shklyar
    Mariya Shklyar
    1,022 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Alperen Guman
    Alperen Guman
    6,552 Points

    Why does an undeclared variable name such as X work with "For X in Y" format? I don't get the logic.

    Posted June 5, 2016 1:10am by Alperen Guman
    Alperen Guman
    6,552 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    2 Answers

  • Jonathan Castro
    Jonathan Castro
    493 Points

    How do I write a program that collects 3 ints from a user using a WHILE loop, maintain a running total, & print the sum?

    Posted May 2, 2016 1:10am by Jonathan Castro
    Jonathan Castro
    493 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Justin Ricke
    PLUS
    Justin Ricke
    Courses Plus Student 345 Points

    Are there do while loops in Python?

    Posted April 5, 2016 8:27pm by Justin Ricke
    Justin Ricke
    Courses Plus Student 345 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Thelma Boamah
    Thelma Boamah
    15,726 Points

    Why don't you have to set word as a variable before you can use it in the for loop to print(word) in my_list?

    Posted February 8, 2016 6:09pm by Thelma Boamah
    Thelma Boamah
    15,726 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    1 Answer

  • Jordan Bester
    Jordan Bester
    4,752 Points

    I am trying to do the bottles of beer on a wall loop but it will not work

    Posted January 23, 2016 10:32am by Jordan Bester
    Jordan Bester
    4,752 Points
    • Python
    • Python Basics (2015)
    • Logic in Python
    • Around and Around

    5 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.