Day 1: Python Programming 🧡

Day 1

Introduction

You can download python from here

or You can use online Code Editor like replit🧡

steps for windows

Step 1

step1

step 2

do not forgot to add python to environment variable
step2

step 3

Keep everything as default. And click finish.

manually adding environment variable

search environment variables on search

image
image
image

Click on Path and add new variable.

confirm

python --version
#output Python 3.11.4
Enter fullscreen mode
Exit fullscreen mode

What is Programming?

Programming is a way (one way due to AI you won’t need programming and through command prompt) to command computer. Due to AI boom according to Nvidia’s CEO you won’t be needing to learn programming to command computer. 🤷‍♀️

I dont know but Python🐍 is a one of the popular computer programming language which follows object oriented paradigm. Object oriented programming style suits for large project and help us implement DIY principle and make code more cleaner.

# model - variable
# price - variable
# self - instance of the calss
class Car: # constructor method
 def __init(self,model,price): self.model = model self.price = price
Enter fullscreen mode
Exit fullscreen mode

Above code tell that hey python compiler I want to make a class🏛 Car(mode,price).

Which contains model and price.

Now one way to do it is create a seperate dictionary for every user. Which will be tedious and boring or better way to use OOP(object oriented programming).

# Create an object
Audi = Car("R8", 100000)
print(Audi.model) # R8
print(Audi.price) # 100000
Enter fullscreen mode
Exit fullscreen mode

note:

  1. It is good practice to use PascalCasing for classes.

more

  • It was developed in 1989 by dutch programmer guido van rossum.
  • The named was inspired from BBC tv show Monty Python’s Flying Circus.
  • It is a general pupose programming and high level language.

my linkedin 🧡


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top