Skip to playerSkip to main contentSkip to footer
  • 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.
Transcript
00:00Welcome back!
00:05In this lecture, we will see the expression and statement
00:09because this is a very basic concept
00:12where the evaluation of Python starts. However,
00:15in the last lecture, we have learned
00:18which way we can assign a value
00:21a is equal to 10, right?
00:24Basically, what do I do?
00:27I will take a memory
00:31and take a name
00:34and take a name.
00:35Make sense?
00:36Do you understand?
00:37You understand?
00:381 number is 10.
00:39I will take a name
00:41and take a name
00:42and take a name
00:43and take a name.
00:44When I have 10 number
00:47to access my name
00:49then I will take a name
00:51and return.
00:53Make sense?
00:54In this case, Python
00:58in this case,
00:59multiple variables
01:01now
01:02you can declare
01:04one line
01:05and declare
01:07one line
01:08and declare
01:09a, b
01:1010, 20
01:11and normally
01:1210
01:13will be a
01:14and 20
01:15will be b
01:16I will say
01:17here
01:18I will say
01:19I will say
01:20I will say
01:21a statement
01:22and run
01:2310, 20
01:24Basically,
01:25I will say
01:26two values
01:27in one line
01:28and add
01:29one line
01:30which is statement
01:31makes sense?
01:32It is statement
01:33which is statement
01:34which is statement
01:35which is statement
01:37so
01:38in one statement
01:39I will say
01:40two values
01:41and two variables
01:42assigned
01:43which is statement
01:44however
01:46if I
01:4720
01:48divided
01:49by two
01:50or
01:51let's say
01:52three
01:53just to differentiate
01:54now
01:55I will run
01:56now
01:57its value
01:58change
01:59this
02:00statement
02:01is
02:02this
02:03statement
02:04is
02:05however
02:06this output
02:07is
02:08expression
02:09makes sense
02:10expression
02:11now
02:12expression
02:13will give you
02:14value
02:15output
02:16and the statement
02:17is total
02:18and the statement
02:19is
02:20that
02:21it is
02:22equal to
02:23assignment
02:24operator
02:25okay
02:26and the reading
02:27preference
02:28is
02:29left
02:30a
02:31right
02:32to
02:33left
02:34python
02:35to
02:37divide
02:38to
02:40divide
02:42and
02:43this
02:44statement
02:45is
02:46not
02:47written
02:48now
02:49what
02:50is
02:51equal
02:52to
02:53i
02:54i
02:55i
02:57i
02:58i
03:00i
03:02i
03:03i
03:04i
03:05next value b toh hai na haan wo a ko assign
03:07abh pher usne nye line ai
03:09usne kaha aqama shuru ho raha
03:11do a or b dho nho hai apadhe
03:13mire paas bandh hooghi statement good good
03:15ab karna kia iska?
03:17acha ye function call karna iske oopar
03:19to usne isko function call karke
03:21value return kare di

Recommended