Skip to content

Instantly share code, notes, and snippets.

@Wulgaren
Created June 3, 2022 16:27
Show Gist options
  • Save Wulgaren/d7a4dde80a396c9d6b1058e28c76e825 to your computer and use it in GitHub Desktop.
Save Wulgaren/d7a4dde80a396c9d6b1058e28c76e825 to your computer and use it in GitHub Desktop.
Hello World Examples 2343
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
Run `python hello_world.py` to print Hello World
Run `ruby hello_world.rb` to print Hello World
@Wulgaren
Copy link
Author

Wulgaren commented Jul 1, 2022

tetstst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment