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 trialNatalie Carlson
1,094 PointsFunctions challenge
Ok, why is this not working...?
float addTwo(float a, float b) { return a + b; }
8 Answers
Florian Neveu
2,383 PointsI'm in the same case... I don't understand ):
Samantha Tyson
384 PointsIs there a way to skip the challenge? I just want to go to the next section.
Holger Liesegang
50,595 PointsI just tested this:
float addTwo(float a, float b) {
return a + b;
}
(and a few IMHO other correct versions) in https://teamtreehouse.com/library/functions Challenge task 1 of 1 of
Implement a function named "addTwo" that returns the sum of two floats. The function will accept two float numbers as arguments and return a float which is the sum of the two arguments passed to the function. (No need to write the main function just write out the implmentation for the addTwo function)
and it gives the error message: "Bummer! Make sure you've defined the return type and both paramter types as 'float' and that you are returning the sum of the arguments as a result."
Maybe there's something wrong with this challenge at the moment...
Kind Regards Holger
Amit Bijlani
Treehouse Guest TeacherThis challenge was broken due to some recent changes but it should work now. Sorry for the inconvenience.
Fuad Adetoro
6,490 PointsThere must be something wrong with that section... hmm
Florian Neveu
2,383 PointsOf course, return on the track (https://teamtreehouse.com/tracks/ios-development) and select the next step !
Samantha Tyson
384 PointsThanks. Of course that makes sense.
Henry Moran
10,516 PointsSo is this right? I'm stuck with this challenge for the moment...
float addTwo(float a, float b){
return a + b;
}