Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
Lecture 25: Statement vs Expression in Python
Nafees AI Lab
Follow
5/14/2025
In AI programming, statements are instructions that cause actions to be performed, while expressions are pieces of code that evaluate to a value. Statements don't typically return a value, whereas expressions do.
Category
π
Learning
Transcript
Display full video transcript
00:00
Welcome back!
00:05
In this lecture, we will see the expression and statement
00:09
because this is a very basic concept
00:12
where the evaluation of Python starts. However,
00:15
in the last lecture, we have learned
00:18
which way we can assign a value
00:21
a is equal to 10, right?
00:24
Basically, what do I do?
00:27
I will take a memory
00:31
and take a name
00:34
and take a name.
00:35
Make sense?
00:36
Do you understand?
00:37
You understand?
00:38
1 number is 10.
00:39
I will take a name
00:41
and take a name
00:42
and take a name
00:43
and take a name.
00:44
When I have 10 number
00:47
to access my name
00:49
then I will take a name
00:51
and return.
00:53
Make sense?
00:54
In this case, Python
00:58
in this case,
00:59
multiple variables
01:01
now
01:02
you can declare
01:04
one line
01:05
and declare
01:07
one line
01:08
and declare
01:09
a, b
01:10
10, 20
01:11
and normally
01:12
10
01:13
will be a
01:14
and 20
01:15
will be b
01:16
I will say
01:17
here
01:18
I will say
01:19
I will say
01:20
I will say
01:21
a statement
01:22
and run
01:23
10, 20
01:24
Basically,
01:25
I will say
01:26
two values
01:27
in one line
01:28
and add
01:29
one line
01:30
which is statement
01:31
makes sense?
01:32
It is statement
01:33
which is statement
01:34
which is statement
01:35
which is statement
01:37
so
01:38
in one statement
01:39
I will say
01:40
two values
01:41
and two variables
01:42
assigned
01:43
which is statement
01:44
however
01:46
if I
01:47
20
01:48
divided
01:49
by two
01:50
or
01:51
let's say
01:52
three
01:53
just to differentiate
01:54
now
01:55
I will run
01:56
now
01:57
its value
01:58
change
01:59
this
02:00
statement
02:01
is
02:02
this
02:03
statement
02:04
is
02:05
however
02:06
this output
02:07
is
02:08
expression
02:09
makes sense
02:10
expression
02:11
now
02:12
expression
02:13
will give you
02:14
value
02:15
output
02:16
and the statement
02:17
is total
02:18
and the statement
02:19
is
02:20
that
02:21
it is
02:22
equal to
02:23
assignment
02:24
operator
02:25
okay
02:26
and the reading
02:27
preference
02:28
is
02:29
left
02:30
a
02:31
right
02:32
to
02:33
left
02:34
python
02:35
to
02:37
divide
02:38
to
02:40
divide
02:42
and
02:43
this
02:44
statement
02:45
is
02:46
not
02:47
written
02:48
now
02:49
what
02:50
is
02:51
equal
02:52
to
02:53
i
02:54
i
02:55
i
02:57
i
02:58
i
03:00
i
03:02
i
03:03
i
03:04
i
03:05
next value b toh hai na haan wo a ko assign
03:07
abh pher usne nye line ai
03:09
usne kaha aqama shuru ho raha
03:11
do a or b dho nho hai apadhe
03:13
mire paas bandh hooghi statement good good
03:15
ab karna kia iska?
03:17
acha ye function call karna iske oopar
03:19
to usne isko function call karke
03:21
value return kare di
Recommended
1:53
|
Up next
Lecture 47: Coding Conditions in Python
Nafees AI Lab
5/18/2025
11:01
Lecture 48: if else condition in Python
Nafees AI Lab
5/18/2025
6:23
Lecture 58: Python has keywords as Continue Break Pass
Nafees AI Lab
5/20/2025
5:46
Lecture 64: Return Keyword in Python Programming
Nafees AI Lab
5/21/2025
4:52
Lecture 50: Python with Boolean values
Nafees AI Lab
5/18/2025
6:07
Lecture 49: AND OR conditions in Python Programming
Nafees AI Lab
5/18/2025
7:48
Lecture 51: Logical Operators in Python
Nafees AI Lab
5/19/2025
2:54
Lecture 34: Python has Boolean Data Type
Nafees AI Lab
5/16/2025
0:27
Making waterproof shoes with duct tape! πποΈ
MetDaan Creative
5 days ago
0:16
When it's your boyfriend's laundry day! π π€£
MetDaan Creative
5 days ago
0:24
Spreading chocolate cream with a plaster! π π
MetDaan Creative
5 days ago
7:40
Mera Mazloom Hussain | Nadeem Sarwar 2020 | 1442
Gham-e-Hussain | ΨΊΩ Ω ΨΨ³ΫΩΨ
6/9/2025
9:38
Episode 1 β The Curious Boy from Ulm (1879-1895)
Nafees AI Lab
6/8/2025
0:37
Top Fully Funded Scholarships in Germany 2025 π©πͺ | Apply Now!
Nafees AI Lab
6/3/2025
0:25
The Boy and the Dragon β βA Friend in the Skyβ
Nafees AI Lab
6/3/2025
1:03
Why Do Rainbows Appear? π | Physics in Everyday Life
Nafees AI Lab
6/3/2025
0:28
Albert Einstein: The Genius Who Changed Time
Nafees AI Lab
6/1/2025
0:40
Stephen Hawkingβs Life in 60 Seconds: From Wheelchair to the Universe
Nafees AI Lab
6/1/2025
0:36
The Forgotten Night Hitler Was Nearly Killed
Nafees AI Lab
5/29/2025
0:31
Dilip Kumar β The Tragedy King of Bollywood
Nafees AI Lab
5/29/2025
0:45
Marlon Brando β The Rebel Who Redefined Acting | Nafees AI Lab
Nafees AI Lab
5/29/2025
0:29
Charles Darwin β Evolution & Natural Selection | Nafees AI Lab
Nafees AI Lab
5/28/2025
0:30
Isaac Newton β Gravity, Motion & Genius | Nafees AI Lab
Nafees AI Lab
5/28/2025
0:52
Allama Iqbal β Poet of the East | Nafees AI Lab
Nafees AI Lab
5/28/2025
0:53
Marie Curie β Life & Achievements | Nafees AI Lab
Nafees AI Lab
5/28/2025