Skip to content

Instantly share code, notes, and snippets.

@shooontan
Last active October 12, 2018 07:55
Show Gist options
  • Save shooontan/f2e1cb9f1e9d76bed19732b6216c9bf6 to your computer and use it in GitHub Desktop.
Save shooontan/f2e1cb9f1e9d76bed19732b6216c9bf6 to your computer and use it in GitHub Desktop.
Hello World Examples

Run ruby hello_world.rb or python hello_world.py to print Hello World

class HelloWorld:
def __init__(self, name):
self.name = name.capitalize()
def sayHi(self):
print "Hello " + self.name + "!"
hello = HelloWorld("world")
hello.sayHi()
class HelloWorld
def initialize(name)
@name = name.capitalize
end
def sayHi
puts "Hello !"
end
end
hello = HelloWorld.new("World")
hello.sayHi
This is a new placeholder file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment