# Step 1: Define a class named "Person" with attributes name and age.
class Person
attr_accessor :name, :age
# Step 2: Initialize the class with the provided name and age.
def initialize(name, age)
@name = name
@age = age
end
# Step 3: Define a method "introduce" to print a greeting with the person's name and age.
def introduce
puts "Hello, my name is #{@name} and I am #{@age} years old."
end
end
# Step 4: Create an instance of the Person class with a given name and age.
person = Person.new("John", 25)
# Step 5: Call the "introduce" method on the person instance.
person.introduce