There's a problem on one of the Learn C# pages

Eric Flamm 10 Reputation points
2024-02-21T20:54:52.68+00:00

OnCreate methods in C# console applications (Get started with C#, Part 5)

  1. Write your first C# method

Unit 7 of 9 - the solution prints 2 fortunes, when the challenge was only to print 1...

Visual Studio Training
Visual Studio Training
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Training: Instruction to develop new skills.
22 questions
{count} votes

4 answers

Sort by: Most helpful
  1. AmaranS 6,845 Reputation points Microsoft Vendor
    2024-02-22T02:06:13.0466667+00:00

    Hi Eric Flamm

       

    Thank you for reaching out to Microsoft Q&A forum.  

    The statement "This code is just 'one possible solution" The fortune teller randomly selects one of the arrays (good, bad, or neutral) based on the luck value, which is generated randomly between 0 and 99 at the beginning of the program.  

     

    The fortune-telling program will continue to generate two fortune messages based on a random luck variable, each message comprising elements from a text array and one of the arrays (good, bad, or neutral) determined by the luck value. Consequently, despite these minor discrepancies in code formatting, the program will consistently deliver two fortune messages as outlined in the comments preceding the code snippet.  

    picture

    Please attempt the code again, if you need more information, kindly provide the screenshot of the output and we'll be happy to offer further assistance.    

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.      


  2. AmaranS 6,845 Reputation points Microsoft Vendor
    2024-06-26T15:39:49.9+00:00

    Hi Eric Flamm,

    Thank you for bringing this to our notice. I'm presently in communication with the author, we will try and get it updated Lab exercise now. find the right answers, please do mark the post which was helpful by clicking on Accept Answer. Has your issue been resolved. If you are still experiencing the problem, please inform us. We are happy to help you.

    Thank you.

    0 comments No comments

  3. AmaranS 6,845 Reputation points Microsoft Vendor
    2024-06-27T01:55:33.3533333+00:00

    Hi Eric Flamm,

    I received an update from the author that the learning path has been revised according to your query, and the experience has also been updated.

    If you continue to face issues, please let us know in the comments. We are here to help.

    If you find this information helpful, please acknowledge by clicking the "Upvote" and "Accept Answer" buttons on the post.

    0 comments No comments

  4. AmaranS 6,845 Reputation points Microsoft Vendor
    2024-06-27T02:18:28+00:00

    Hi Eric Flamm,

    I am receiving an update from the author that the learning path and query module exercises have been updated.

    If you continue to face issues, please let us know in the comments. We are here to help.

    If you find this information helpful, please acknowledge by clicking the "Upvote" and "Accept Answer" buttons on the post.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.