+ 2
Any line of text is said to be a statement. Set of statements in a certain block compromise a function. each expression in programming is called a statement. See inp = input() #is a statement, input() is a function. It's a predefined function and you can defined your own functions which are user defined function. Function calls and definitions are proceeded by parenthesis. print() #is a valid statement and print is a function, predefined.. n = sqrt(9) is a statement, sqrt is a function. a, b = 4,5 #is a valid statement in python. a = 4 is also a assignment statement. ( a >= 4 and b <= 5 ) is a conditional statement. There are also statements are different types.. function is a block of code : defined as def function_name( <arguments> ) : #function statements call it by statement like : function_name(<arguments>)
23rd Sep 2022, 11:07 AM
Jayakrishna 🇼🇳
+ 5
Your question cut off. Add details in description place. Better to show that sample code snippet.
22nd Sep 2022, 7:50 AM
Jayakrishna 🇼🇳
+ 2
if True : print( 1 ) print( 2 ) print( 3 ) : must be added because of syntax rule. If you forgot, it will raise error. 2 print statements are indented with same space in successive lines belong to same block and here it belong to if block. The 3rd print is not belong if block. It is next statement after if block. Python uses indentation to make block. in other c/c++/java, languages, use { } for making blocks...
25th Sep 2022, 12:27 PM
Jayakrishna 🇼🇳