Log in from a computer to take this course

You'll need to log in from a computer to start Learn Ruby. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn

Excellent! Last step: let’s create an instance of our Computer class.

You’ve done this before, but here’s a refresher.

class Person def initialize(name) @name = name end end emma = Person.new("emma")
  1. In the example above, we first define a Person class with an initialize method.
  2. Then, we create a new instance of Person and store it in a new variable called emma.

Instructions

1.

After your class, create a new instance of Computer and store it in a new variable called my_computer. Feel free to use whatever username and password you like for your arguments!

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?