Introduction
Welcome to PythonSage! where we embark on a journey to unlock the full potential of Python
programming! Whether you're a beginner or looking to enhance your skills, our
blog is your go-to resource for all things Python. Don't forget to check out
our previous posts to build a solid foundation.
You Need to Learn Python Right Now. Hold
Up. Why?
Why do you need to learn Python right
now? The biggest reason is simple: if you want to get a job in IT or advance in
your current job, you need to know Python or at least learn it soon. Whether
you're aiming to be a network engineer, cloud engineer, or ethical hacker,
Python is a must-have skill.
Honestly, that's my list. That's my one
reason. Do you need another reason beyond the fact that Python is just cool,
amazing, and almost magical? Probably not.
Welcome to PythonSage blog of My Python
Core
I want to teach you everything you need
to know to become proficient in Python, starting from zero. You don't need any
prior knowledge. By the end of this blog, you'll have the skills to be awesome
at Python and apply it to whatever job you have.
What Do You Need to Start?
You won't need anything special to start learning Python with me in this course. You can install and run Python on any computer—Linux, Mac, or PC. But we won't even bother with that for now because that takes time. We're going to start coding immediately, right here in your browser. Yes, even a phone with a browser will do.
Get Started with Free Python Lab
Check the link in the description for
access to my free Python lab through my free membership. Once you're signed up,
you'll see an environment like this:
Code:
print("Hello, World!")
Click inside the lab and start typing.
You will be invited to create a free Repl. it account, which is the tool we will use
for all Python activities. It's free and allows you to save and edit your code.
Let's Start Coding
Click on the play button or run button after typing the code. You will see "Hello, World!" printed out in the Python terminal. Congratulations, you have just run your first Python code!
Break Down of the Code
When we write print("Hello,
World!"), we are giving our computer a set of instructions. The print
function tells the computer to display "Hello, World!" in the
terminal.
Understanding Strings
In Python, text is called a string. Strings are a sequence of characters enclosed in quotation marks. You can use either double quotes " " or single quotes ' ', but it's best to be consistent.
Code:
print("I am Abdullah Cheema")
print('My website name is Python Sage')
Comments
Use comments to add notes to your code.
Anything after a # is ignored by the computer.
# This is a comment
print("Hello, World!") # This prints Hello, World!
Exercise Time
Try these exercises to get comfortable with strings and printing:
> Print your name.
> Print your favorite quote.
> Combine two strings with a space in
between.
> Print a multi-line string using triple
quotes.
> Print a string multiple times using
multiplication.
Conclusion
With these fundamentals under your belt, you are well on your way to becoming a Python pro. Keep practicing and stay tuned for more blogs and guides on PythonSage. Happy coding!