Python For Beginners (Part 1)

# This is a comment in python
# For the new line
x = 1 # a variable of value 1
# whatever is writing After # is a comment
python3 filename.py
if a condition q is fulfilled :
Block X of the code is executed
elif a condition t is fulfilled :
Block Y will be executed
else :
Block Z will be executed
if weather is nice :
I will play football
elif weather is rainy :
I will stay at home
else :
Who am i kidding , i have no friends to play with
┌─[asif221b@parrot]─[~]
└──╼ $/usr/bin/python3 /home/asif221b/Documents/practice.py
Enter a number :
4
The number you entered is 4
┌─[asif221b@parrot]─[~]
└──╼ $/usr/bin/python3 /home/asif221b/Documents/practice.py
Enter a number :
5
The number you entered is other than 4

I am a Cyber Security Engineer(currently studying) and a technology enthusiast.Looking forward to engage with the Medium community and share knowledge!

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