28.10.2021 Views

Python Tutorial ( PDFDrive )

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Syntax: ..................................................................................................... 77

Flow Diagram: .......................................................................................... 77

Example: .................................................................................................. 78

The elif Statement .................................................................................... 78

Example: .................................................................................................. 78

nested if statements ................................................................................. 79

Syntax: ..................................................................................................... 79

Example: .................................................................................................. 79

Single Statement Suites: .......................................................................... 80

Python Loops ........................................................................... 81

while loop ................................................................................................. 82

Syntax: ..................................................................................................... 82

Flow Diagram: .......................................................................................... 82

Example: .................................................................................................. 83

The Infinite Loop: ..................................................................................... 83

The else Statement Used with Loops ...................................................... 84

Single Statement Suites: .......................................................................... 84

Syntax: ..................................................................................................... 84

Flow Diagram: .......................................................................................... 85

Example: .................................................................................................. 85

Iterating by Sequence Index: ................................................................... 86

The else Statement Used with Loops ...................................................... 86

Syntax: ..................................................................................................... 87

Example: .................................................................................................. 87

Loop Control Statements: ........................................................................ 88

Syntax: ..................................................................................................... 88

Flow Diagram: .......................................................................................... 89

Example: .................................................................................................. 89

Syntax: ..................................................................................................... 90

Flow Diagram: .......................................................................................... 90

Example: .................................................................................................. 90

Syntax: ..................................................................................................... 91

Example: .................................................................................................. 91

Python Numbers ...................................................................... 92

Examples: ................................................................................................ 92

Number Type Conversion: ....................................................................... 93

Mathematical Functions: .......................................................................... 93

Syntax ...................................................................................................... 96

Parameters ............................................................................................... 96

TUTORIALS POINT

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!