Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • 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,647 Points

    Mystery Variable 'word' in first example.

    Posted May 3, 2017 8:34pm by Enzo Cnop
    Enzo Cnop
    5,647 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.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord