Wonderful work getting through the fmt package’s methods! There are many more methods that we didn’t include, but you can read through Go’s fmt documentation for more in-depth information. Remember, each method is unique in its own way, and it’s up to you to decide what you need to do and which method will help you accomplish that need!

In this lesson we went over:

  • How fmt is pronounced and its purpose.
  • The difference between fmt.Println() and fmt.Print().
  • How to interpolate strings using fmt.Printf() and verbs.
  • The verbs: %v, %T, %d, and %f.
  • fmt.Sprint(), fmt.Sprintln(), fmt.Sprintf() will not print strings, but formats them.
  • fmt.Scan() allows us to take in user input.


If you want to challenge yourself:

  • Use another one of fmt’s methods.
  • Find out how to interpolate a string that contains an % character.
  • Create a program that greets a user and conducts a short conversation.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?