Intro to IDE Lab

Lab

Lab time is designed for you to prepare for upcoming lessons, and practice what you have learned so far. Both aspects are important for your success. During this time, you are encouraged to collaborate with fellow students, and reach out to instructors with any and all questions!

Lab Objectives

  • Practice coding using the Visual Studio IDE
  • Implement a common code challenge using loops

Practice

Today, we explored how to write code using Visual Studio. This is where we will do most of our work from now on, so it’s a good idea to get really comfortable with this tool.

Process Review

  1. Create a new Console Application in Visual Studio. Name your solution ‘FizzBuzz’. As you create this new application, in your notebook write down the steps you are taking - be as specific as possible!

  2. Once your application is created, use Console.WriteLine() to print a message to the console. Again, in your notebook write down what you do to accomplish this task.

  3. In your notebook, write a reflection of what is different about this Visual Studio process from what we were previously doing in REPLit. What is different about creating a project? Are there differences in how the applications are run?

Keep an eye on Slack We will be coming together to discuss your reflections!

FizzBuzz

There are a few common programming ‘problems’ that you will hear about over and over - they might be used for interview questions, or as an example of syntax for other programming languages. One of these problems is called ‘FizzBuzz’ and it goes like this:

FizzBuzz

Your task is to print integers 1 to 100.  
If a number is divisible by 3, print 'Fizz'.
If a number is divisible by 5, print 'Buzz'.
If a number is divisible by both 3 and 5, print 'FizzBuzz'.

For example:
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 
11, Fizz, 13, 14, FizzBuzz, 16, 17, Fizz, 19, Buzz...
  1. In small groups, take 10-15 minutes to pseudocode an implementation of ‘FizzBuzz’ - it will probably be helpful to use one or more of the methods we learned in the Looping lesson 😉.
    • Use Excalidraw to collaborate on the pseudocoding.
    • ✅ send the collaboration link to your instructor, as well!
  2. Individually, In the ‘FizzBuzz’ Solution you created above, implement your psuedo-code!
  3. Your instructor will send you out into small groups to discuss your solutions. There are multiple ways to solve this problem, so it is ok and expected that not everyone’s code will look the same! In that group, discuss the following:
    • Each person will do a walkthrough of their code and psuedo-code - share your screen and describe what is happening on each line of code, and describe how that is similar or different to what you psuedo-coded.
    • Discuss which parts of the project were difficult, or didn’t work as expected. Did you come accross any errors? If so, how did you fix them?
    • As a group, come up with three benefits of using Visual Studio to write this code. As you brainstorm, you might think about what tools Visual Studio has, or how you could (or could not) execute the program in an application like Microsoft Word or Google Docs.
    • ✅ Nominate 1 person to share out 1 interesting thing your group discussed.

Keep an eye on Slack We will be coming together to discuss your reflections!

Lesson Search Results

Showing top 10 results