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 Antworten
+ 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…!