0
(Age Group) Iām stuck with a section of code on module 3 and need help
I wrote the code for the child age group and it worked but when I added the other code for the other 2 age groups it breaks all of the code and would just like some pointers as to where Iāve gone wrong or whether itās just a bug? if(age <11) Console.WriteLine(āChildā); //works perfectly on its own //this is what breaks everything else if(age >= 11 && <= 17) Console.WriteLine(āTeenā); else if(age >= 18 && <= 64) Console.WriteLine(āAdultā);
4 Answers
+ 1
I've found out the hard way that we need to add as tags, the language we need help with š
Not even sure in what language you are working(im a newb), but it feels like there should be another "age" variable in both cases...
Just my assumption...
Like:
else if (age >= 11 && age <=17)
As I said , I'm not sure , cause don't even know the language (tho they all start to look alike after you learn one of them)
Try that out,maybe it worksš
+ 1
You are a genius and im stupid š you were in fact correct ive spent nearly 2 hours working on this so thank you very much! Its also in C#, again thank you so much! I need to sharpen my eyes š
+ 1
Will Ross ohh, trust me, I know what you mean.
I had trouble when I started also š
I think my longest one that took me to complete was around 5 hours(and I didn't want to just look up the answerš¤£ was a matter of principle)
And it will get harder to learn, but once you get it, it gets easy! I promisešš¤£
Some tips that helped me :
-Don't be shy to go back and re-read the whole course if you need to.
-Compare your code to examples given.
And
-If a topic is hard to understand here at SoloLearn , go on other sites where there's more info on that specific topic/course!
Practice everyday and don't give up!
We can do it!šŖ
+ 1
Eugene thank you lol! Such a complex language looking at it as a starter but hoping i can get it integrated into my brain soon! Had no issues since, i just cant believe how simple the solution wasā¦!