So This is just for fun.
Most People said to me because I Started Using Python Mostly in my projects.
And They Tell Me That Python is not a Real
programming language or Python is For Kids because it is too easy to write.
So for just fun.
I created a repo with various ways of writing Hello World Program In Python.
For Starters It Started Like this.
Program for Beginners
print('Hello World!')
Difficulty Level 0 : Program With Shebang
#!/usr/bin/env python3
print('Hello World!')
Difficulty Level 1 : Program With variable
#!/usr/bin/env python3
message = 'Hello World!'
print(message)
Difficulty Level 2 : Program With Main Condition
#!/usr/bin/env python3
message = 'Hello World!'
if __name__ == '__main__':
print(message)
Difficulty Level 3 : Program With external function.
#!/usr/bin/env python3
msg = "Hello World!"
def display_msg(message):
print(message)
if __name__ == '__main__':
display_msg(message)
Difficulty Level 4 : Program With .env
file and running process
#!/usr/bin/env python3
import os
from dotenv import load_dotenv
load_dotenv() # take environment variables from .env file
msg = os.getenv('MESSAGE')
def display_msg(message):
print(message)
if __name__ == '__main__':
display_msg(msg)
running proces at github.com/shriekdj/hello-world-py/tree/mai..
Repo Is At
It Will Become more difficult by time just wait for it.
ย