TRANSCRIPTEnglish

Python for Beginners - Learn Coding with Python in 1 Hour

1h 0m 4s9,856 words1,596 segmentsEnglish

FULL TRANSCRIPT

0:02

in this python tutorial you're going to

0:03

learn everything you need to know to

0:05

start programming in python if you want

0:07

to learn python programming for data

0:08

science machine learning or web

0:10

development this python tutorial is the

0:12

perfect place to learn python you don't

0:14

need any prior knowledge in python or

0:16

programming in general i'm going to

0:18

teach you everything from scratch i'm

0:19

mosh hamadani and i've taught millions

0:21

of people how to code through this

0:23

channel if you're new here make sure to

0:25

subscribe as i upload new videos every

0:27

week now let's jump in and get started

0:30

all right before we get started let me

0:31

give you some ideas about what you can

0:32

do with python that's a very common

0:34

question python is a multi-purpose

0:36

programming language so you can use it

0:38

for a variety of different tasks you can

0:40

use python for machine learning and ai

0:42

in fact python is the number one

0:44

language for machine learning and data

0:45

science projects python is also very

0:47

popular in web development using python

0:50

and a framework called django you can

0:51

build amazing websites here are five

0:54

websites powered with python and django

0:56

youtube instagram spotify dropbox and

1:00

pinterest you can also use python in

1:02

automation with python you can save your

1:04

time and increase your productivity by

1:06

automating repetitive tasks so why are

1:09

you learning python are you learning it

1:10

for automation for data science or web

1:12

development let me know in the comment

1:14

section below

1:19

all right the first thing i want you to

1:20

do is to head over to python.org to

1:23

download the latest version of python so

1:26

you go to downloads and select the

1:28

latest version of python

1:33

here in your downloads folder you should

1:34

see this package simply double click it

1:37

you're going to see this python

1:38

installer if you're on windows you will

1:41

see this checkbox over here add python

1:44

to path make sure to check it it's

1:46

really important otherwise you're not

1:48

going to be able to follow this tutorial

1:50

simply click on continue

1:52

again

1:53

one more time

1:55

i agree with the terms

1:57

and install the latest version of python

2:00

now here you need to enter the username

2:02

password of your computer

2:03

so

2:04

let's do that real quick

2:08

next you need to install a code editor

2:11

we use a code editor to write our code

2:13

and execute it the most popular code

2:15

editor for python is pycharm you can get

2:18

it from jetbrains.com

2:20

pycharm

2:21

so on this page

2:23

click on download

2:25

you should see two different editions

2:27

one is the professional edition which is

2:29

commercial and we also have this

2:31

community edition which is free and open

2:33

source so we're going to download the

2:35

community edition

2:39

now in your downloads folder you should

2:41

have this package let's double click it

2:45

if you're on windows you're going to see

2:47

an installation wizard so simply click

2:49

on the next button until you install

2:51

pycharm if you're on a mac you need to

2:53

drag this pycharm and drop it onto the

2:56

applications folder

3:00

now

3:01

let's open it

3:02

the first time you open pycharm you have

3:04

to configure a few settings we don't

3:06

want to spend time on this so over here

3:09

we're going to click on skip remaining

3:11

and set defaults

3:14

now let's create a new project

3:16

over here we can specify the location

3:18

and the name of our python project so

3:22

let's append hello world to this path

3:25

this is where our python project is

3:26

going to be saved so let's click on

3:29

create

3:32

in this window you can see the content

3:34

of our project so here's our hello world

3:36

project currently we have only one

3:38

folder inside this project that is vn

3:40

which is short for virtual environment

3:42

we'll talk about virtual environments in

3:44

the future so currently we don't have

3:46

any python files inside this project a

3:49

real application can consist of tens or

3:51

hundreds or even thousands of python

3:53

files so let's right click on the

3:55

project name

3:57

and go to new python file we're going to

4:00

call this file up

4:04

now we can collapse this project window

4:05

by clicking on this icon so now we have

4:08

more space let's write our first python

4:10

code we're going to write print all in

4:12

lowercase then add parentheses

4:15

then add quotes either single quotes or

4:18

double quotes

4:20

and inside this code we're going to

4:21

write hello world

4:23

so this is what we call a string a

4:25

string means a string or sequence of

4:28

characters in simple words that means

4:30

textual data so in python and in many

4:33

other programming languages whenever

4:35

we're dealing with textual data we

4:37

should always surround our text with

4:39

quotes

4:40

in python we can use single or double

4:42

quotes

4:43

now this print you see here is a

4:45

function built into python and we can

4:48

use it to print a message on our

4:49

application window so let me show you

4:52

how to run this code

4:54

on the top we go to the run menu and

4:56

then select run

4:58

note that there is a shortcut associated

5:00

with this command i always use shortcuts

5:02

because they increase my productivity so

5:05

let's click on this

5:07

now select app

5:09

and over here

5:10

you can see this little window this is

5:12

what we call the terminal window and it

5:14

shows the output of our program

5:16

so here's the hello world message

5:18

printed in the terminal window now as

5:20

you learn more python you will learn how

5:22

to build applications that have a

5:23

graphical user interface that's an

5:25

advanced topic so for now let's not

5:27

worry about it

5:34

alright now let's talk about variables

5:36

we use variables to temporarily store

5:38

data in a computer's memory for example

5:41

we can store the price of a product or

5:43

someone's name their email their age and

5:46

so on let me show you so

5:48

to declare a variable we start by typing

5:50

a name for that variable let's say age

5:54

then we add an equal sign

5:56

and then we type a value let's say 20.

5:59

so with this we're storing the number 20

6:01

somewhere in our computer's memory and

6:03

we're attaching this age as a label for

6:05

that memory location so now we can read

6:08

the value at this memory location and

6:10

print it on the terminal so instead of

6:13

printing hello world we want to print

6:15

the value of the age variable

6:17

so i'm going to delete what we have

6:19

inside parenthesis

6:21

and type age note that i'm not adding

6:25

quotes because if i run this program

6:27

we'll see the text h on the terminal we

6:29

don't want that we want the value of the

6:31

age variable so let's remove the quote

6:35

and

6:36

print the value of the age variable

6:38

now here on the toolbar you can click on

6:41

this play icon to run your program or

6:43

you can use the shortcut that i showed

6:44

you in the last video so the shortcut is

6:47

over here on a mac that's ctrl shift and

6:51

r

6:52

so

6:53

there you go

6:54

now you can see the value of the age

6:56

variable

6:58

now we can also change the value of a

6:59

variable for example on line 2

7:02

we can set 8 to 30.

7:05

now when we run our program

7:07

we see 30. so as you can see our program

7:10

gets executed from top to bottom

7:12

so this is how we can declare and use a

7:14

variable now let's look at a few more

7:16

examples

7:17

so i'm going to declare

7:19

another variable called price

UNLOCK MORE

Sign up free to access premium features

INTERACTIVE VIEWER

Watch the video with synced subtitles, adjustable overlay, and full playback control.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.

    Python for Beginners -… - Full Transcript | YouTubeTranscript.dev