Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Logic in Python Try and Except

Sam Blaha
Sam Blaha
15,146 Points

Cannot figure out task 2...

I have looked this up and am aware of how to do task 3 with the TRY and EXCEPT portions but I am just confused on the minimal steps I need to take to just convert these to floats. Please help! thanks!

trial.py
def add(float(num1), float(num2)):
    return num1 + num2
nakalkucing
nakalkucing
12,964 Points

Hi! I think I know what you're asking, but could you add your original code that you used to pass the first two tasks? Thanks.

nakalkucing
nakalkucing
12,964 Points

That's great! I'm glad you figured it out. Always glad to help. :)

1 Answer

Sam Blaha
Sam Blaha
15,146 Points

I was just staring at this for too long, figured it out.

Thank you for responding tho!