Scout to Scout: Programming Requirement 5C

Scout to Scout: Programming Requirement 5C

December 26, 2017 Merit Badge Programming Scout to Scout 0

The information below is provided by Mister Merit Badge Jr., a scout, with the purpose of helping other scouts understand the steps he had to take to complete the specific requirement.

Programming Requirement 5c: With your counselor’s approval, choose a third programming language and development environment, different from those used for requirements 5a and 5b and in a different industry from 5a or 5b. Then write, debug, and demonstrate a functioning program to your counselor, using that language and environment

To do this requirement, I used the website repl.it, and choose the programming language PHP.

I talked about repl.it in my post about Programming Requirement 5a, I highly recommend using it if you are doing the programming merit badge.

To begin I started by reading examples of PHP to see how to write the code, I used both Google and repl.it for all of my research. I started with a PHP “Hello World” program to show me how to output text and how code is structured in PHP. Then I looked at how inputs were handled. Then I was ready to write my code, which I wanted to guess the user’s age based on the year they were born.

I had to find a way to determine the current year in PHP, which I was able to find in Google. After I had the year, I was able to complete my program. I then used Google to find out how to write comments in PHP so anyone looking the code would understand exactly what the program was doing at each step of the code.

If you’d like to see the program I wrote, you can see it below or at https://repl.it/@ekeown/NKRequirement5c.

Leave a Reply

Your email address will not be published. Required fields are marked *