Create a program which prints “Hello World” to the terminal.
What is whitespace?
What is a comment? What are the two ways of writing a comment?
Our program began with package main. What would the files in the fmt package begin with?
We used the Println function defined in the fmt package. If we wanted to use the Exit function from the os package what would we need to do?
Modify the program we wrote so that instead of printing Hello World it prints Hello, my name is followed by your name.
Short Variable Declarations
Create a program which prints “Hello <NAME>” with <NAME> replaced with your name to the terminal using a variable.
Use fmt.Scanf to read a user’s name and print “Hello <NAME>” with <NAME> replaced with the user’s name to the terminal.
Create a program which converts:
Miles to Kilometers
Fahrenheit to Celsius
Pounds to Kilograms
Floating Point Numbers
How are integers stored on a computer?
We know that (in base 10) the largest 1 digit number is 9 and the largest 2 digit number is 99. Given that in binary the largest 2 digit number is 11 (3), the largest 3 digit number is 111 (7) and the largest 4 digit number is 1111 (15) what's the largest 8 digit number? (hint: 101-1 = 9 and 102-1 = 99)
Although overpowered for the task you can use Go as a calculator. Write a program that computes 32132 × 42452 and prints it to the terminal. (Use the * operator for multiplication)
What is a string? How do you find its length?
What's the value of the expression (true && false) || (false && true) || !(false && false)?
A Deeper Look
Stack vs Heap
Write a program that prints out all the numbers evenly divisible by 3 between 1 and 100. (3, 6, 9, etc.)
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".