Python Session 01j Updated
Python Session 01j Updated
Components Definition
Central Processing Unit[CPU] It helps in processing the instructions.
Reserved
words in
Python
Just a Minute
To learn a programming
language,
____________and
__________ are required.
Just a Minute
To learn a programming
language,
____________and
__________ are required.
http://www.pythonlearn.com/install.php
Interpreter reads the source code of the program, line by line, parses
the source code, and interprets the instructions.
When Python is run interactively, Python processes every line
immediately and is ready for next line.
_________is used to
execute the program
statements line by line
Just a Minute
Answer: Interpreter
What Could Possibly Go
Wrong?
Syntax Errors
A syntax error occurs when the “grammar” rules of Python are
violated
The following example shows a syntax error
What Could Possibly Go
Wrong? (Contd.)
Logic Errors
A logic error is when the program has good syntax but there is
a mistake in the order of the statements.
The following are some of the instances which creates a logic
error.
Using the wrong variable name
Indenting a block to the wrong level
Using integer division instead of floating-point division
Making a mistake in a boolean expression
Semantic Errors
A semantic error is when the description of the steps to take is
syntactically perfect but the program does not do what it was
intended to do.
Just a Minute