Get Started with Python in under 10 minutes

A Beginners Guide to Programming in Python

Part I: Setting up the coding environment

Follow the GIF if you have any confusions.

Part II: Let’s Write Some Code!

1. Let’s print stuff using Python :

print('Hello World!')
print("Hello World!")

2. Comments in Python

3. Variables in Python

Let’s assign a number to a variable.

myVariable = 13
myVariable2 = 12.6969
type(myVariable)
type(myVariable2)
# To view this in the console pass the above statement inside the print function like this :print(type(myVariable))
print(type(myVariable2))

Let’s assign a character/string to a variable.

char1 = 'a'
string1 = "Musk Cult"

4. Arithmetic Operations in Python

myVariable1 = 6
myVariable2 = 3

Addition + :

myVariable + myVariable2# To see the result on the console :
print(myVariable + myVariable2)

Subtraction - :

print(myVariable - myVariable2)

Multiplication * :

print(myVariable * myVariable2)

Division / :

print(myVariable / myVariable2)

5. Printing variables

result = myVariable + myVariable2
print(result)
print("The result of addition is :",result)
print("%s is the value of myVar!" % myVar)
print("The result of addition of %s and %s is : %s" % (myVar,myVar2,result))

6. Getting input from the user.

myVar = input("Enter the First Number : ")
myVar2 = input("Enter the Second Number : ")
myVar = int(input("Enter the First Number : "))
myVar2 = int(input("Enter the Second Number : "))

And that’s pretty much it for the basics. Stay tuned for more tutorials! If you enjoyed the article, make sure you follow the publication for future posts.

Peace Out ✌️

I write about Tech. Algorithms. Programming. And that kinda thing you know?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store