Home | | Computer Science 12th Std | Python Control Structures: Points to remember

Chapter: 12th Computer Science : Chapter 6 : Core Python : Control Structures

Python Control Structures: Points to remember

Programs consists of statements which are executed in sequence, to alter the flow we use control statements.

Points to remember:

·        Programs consists of statements which are executed in sequence, to alter the flow we use control statements.

·        A program statement that causes a jump of control from one part of the program to another is called control structure or control statement.

·        Three types of flow of control are

o   Sequencing

o   Branching or Alternative

o   Iteration

·        In Python, branching is done using various forms of ‘if’ structures.

·        Indentation plays a vital role in Python programming, it is the indentation that group statements no need to use {}.

·        Python Interpreter will throw error for all indentation errors.

·        To accept input at runtime, earlier versions of Python supported raw_input(), latest versions support input().

·        print() supports the use of escape sequence to format the output to the user’s choice.

·        range() is used to supply a range of values in for loop.

·        break, continue, pass act as jump statements in Python.

·        pass statement is a null statement, it is generally used as a place holder.

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
12th Computer Science : Chapter 6 : Core Python : Control Structures : Python Control Structures: Points to remember |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.