Skip to main content

NOTICE: On Friday Nov 6, Workspaces will be temporarily unavailable for maintenance.

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

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

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

  • 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
  • Leo Marco Corpuz
    Leo Marco Corpuz
    18,975 Points

    Doc test challenge

    Posted May 22, 2019 2:47am by Leo Marco Corpuz
    Leo Marco Corpuz
    18,975 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Unsubscribed User
    Unsubscribed User
    7,263 Points

    Hi there, I think that my code is right but it doesn't compile? Why? Where do I make a mistake

    Posted July 17, 2018 7:06pm by Unsubscribed User
    Unsubscribed User
    7,263 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Team Voywing
    Team Voywing
    18,181 Points

    Add a doctest to average() that tests the function with the list [1, 2]. Because of how we test doctests, you'll need to

    Posted January 18, 2018 5:30am by Team Voywing
    Team Voywing
    18,181 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • nicole lumpkin
    PLUS
    nicole lumpkin
    Courses Plus Student 5,328 Points

    Can anyone spot my mistake?

    Posted December 11, 2017 3:56pm by nicole lumpkin
    nicole lumpkin
    Courses Plus Student 5,328 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Dima Dmitriy
    PLUS
    Dima Dmitriy
    Courses Plus Student 599 Points

    How it works?

    Posted June 4, 2017 12:41pm by Dima Dmitriy
    Dima Dmitriy
    Courses Plus Student 599 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • ASHOK Gudivada
    ASHOK Gudivada
    11,701 Points

    What's wrong with my code?

    Posted April 19, 2017 8:17pm by ASHOK Gudivada
    ASHOK Gudivada
    11,701 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • jasonwint2
    jasonwint2
    3,437 Points

    What I am missing here?

    Posted March 18, 2017 11:40pm by jasonwint2
    jasonwint2
    3,437 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Nitin Chauhan
    PLUS
    Nitin Chauhan
    Courses Plus Student 277 Points

    Doctest fails

    Posted October 15, 2016 3:46pm by Nitin Chauhan
    Nitin Chauhan
    Courses Plus Student 277 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Arihant Jain
    Arihant Jain
    306 Points

    Confusing!

    Posted June 7, 2016 6:32am by Arihant Jain
    Arihant Jain
    306 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Steven Clement
    Steven Clement
    11,473 Points

    Python Testing Challenge 1 Task 1

    Posted June 6, 2016 5:23pm by Steven Clement
    Steven Clement
    11,473 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    2 Answers

  • Victor Gavojdea
    Victor Gavojdea
    11,796 Points

    Doctest code works in python but not on the test.

    Posted April 23, 2016 7:45pm by Victor Gavojdea
    Victor Gavojdea
    11,796 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    3 Answers

  • Darryn Smith
    Darryn Smith
    32,043 Points

    Code not passing Challenge: Create a Doctest. Help, please.

    Posted January 11, 2016 5:07am by Darryn Smith
    Darryn Smith
    32,043 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    8 Answers

  • Casey Huckel
    PLUS
    Casey Huckel
    Courses Plus Student 4,257 Points

    Somehow this didn't pass

    Posted December 11, 2015 2:30am by Casey Huckel
    Casey Huckel
    Courses Plus Student 4,257 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    2 Answers

  • Jonathan Walker
    Jonathan Walker
    1,490 Points

    Python Testing Challenge Task 1 of 1

    Posted July 22, 2015 3:15pm by Jonathan Walker
    Jonathan Walker
    1,490 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • MUZ141065 Diana Shone
    MUZ141065 Diana Shone
    2,978 Points

    Add a doctest to average() that tests the function with the list [1, 2]. Because of how we test doctests, you'll need to

    Posted July 10, 2015 7:48am by MUZ141065 Diana Shone
    MUZ141065 Diana Shone
    2,978 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    2 Answers

  • Milagros Roman
    Milagros Roman
    1,228 Points

    doctest is not easy

    Posted July 9, 2015 1:03am by Milagros Roman
    Milagros Roman
    1,228 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Adam Raitano
    Adam Raitano
    5,387 Points

    Add a doctest to average()...

    Posted July 8, 2015 7:53pm by Adam Raitano
    Adam Raitano
    5,387 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • Annie Scott
    Annie Scott
    27,614 Points

    bummer check preview for details , I have space in between , but it is still not working what am i doing worn

    Posted June 6, 2015 4:22pm by Annie Scott
    Annie Scott
    27,614 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    3 Answers

  • Rungano Matonda
    Rungano Matonda
    3,237 Points

    add a doctest to average() that tests the fucntion with the list [1,2]

    Posted May 20, 2015 6:23am by Rungano Matonda
    Rungano Matonda
    3,237 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

  • MUZ140502 Natasha Hove
    MUZ140502 Natasha Hove
    3,732 Points

    Add a doctest to average() that tests the function with the list [1, 2]. Because of how we test doctests, you'll need to

    Posted April 24, 2015 11:58am by MUZ140502 Natasha Hove
    MUZ140502 Natasha Hove
    3,732 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    2 Answers

  • Devin Scheu
    Devin Scheu
    66,191 Points

    Phython Testing

    Posted April 24, 2015 3:50am by Devin Scheu
    Devin Scheu
    66,191 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    2 Answers

  • Michael B
    Michael B
    3,990 Points

    Doctest doesn't work for me - tried lots of variations

    Posted April 21, 2015 1:12am by Michael B
    Michael B
    3,990 Points
    • Python
    • Python Testing
    • First Steps With Testing
    • Create a Doctest

    1 Answer

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