Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4.2 TrustPilot
logo-home
Notes de cours

Class notes Computer programming

Note
-
Vendu
-
Pages
21
Publié le
27-09-2025
Écrit en
2025/2026

It is a based on the python programming language where it teaches us about the basic concept of of python and how to start python programming

Établissement
Junior / 11th Grade
Cours
Computer programming










Oups ! Impossible de charger votre document. Réessayez ou contactez le support.

École, étude et sujet

Établissement
Junior / 11th grade
Cours
Computer programming
Année scolaire
3

Infos sur le Document

Publié le
27 septembre 2025
Nombre de pages
21
Écrit en
2025/2026
Type
Notes de cours
Professeur(s)
Inconnu
Contient
Toutes les classes

Sujets

Aperçu du contenu

CHAPTER -5
GETTING STARTED WITH PYTHON
Introduc on to python

We have wri en algorithms for different problems in Chapter 4. Let us now move a step further
and create programs using any version of Python 3. But before learning about Python programming
language, let us understand what is a programming language and how it works.
An ordered set of instruc ons to be executed by a computer to carry out a specific task is
called a program, and the language used to specify this set of instruc ons to the computer is
called a programming language.
As we know that computers understand the language of 0s and 1s which is called machine language
or low- l e v e l language. However, it is difficult for humans to write or comprehend instruc ons
using 0s and 1s. This led to the advent of high-level programming languages like Python, C++, Visual
Basic, PHP, Java that are easier to manage by humans but are not directly understood by the
computer.
A program wri en in a high-level language is called source code. Recall from Chapter 1
that language translators like compilers and interpreters are needed to translate the source
code into machine language. Python uses an interpreter to convert its instruc ons into
machine language, so that it can be understood by the computer.
Features of Python

 Python is a high level language. It is a free and open source language.
 It is an interpreted language, as Python programs are executed by an interpreter.
 Python programs are easy to understand as they have a clearly defined syntax and
rela vely simple structure.
 Python is case-sensi ve. For example, NUMBER and number are not same in Python.
 Python is portable and pla orm independent, means it can run on various opera ng
systems and hardware pla orms.
 Python has a rich library of predefined functions.
 Python is also helpful in web development. Many popular web services and applica ons are
built using Python.
 Python uses indenta on for blocks and nested blocks.
Working with Python
To write and run (execute) a Python program, we need to have a Python interpreter installed on our
computer or we can use any online Python interpreter. The interpreter is also called Python shell.

,In the above screen, the symbol >>> is the Python prompt, which indicates that the interpreter
is ready to take instruc ons. We can type commands or statements on this prompt to execute
them using a Python interpreter.
Execu on Modes
There are two ways to use the Python interpreter:
Interac ve mode
Script mode
Interac ve Mode: Interac ve mode allows execu on of individual statement instantaneously.
we can simply type a Python statement on the >>> prompt directly. As soon as we press enter, the
interpreter executes the statement and displays the result(s), as shown in Figure




Working in the interac ve mode is convenient for tes ng a single line code for instant execu on.
But in the interac ve mode, we cannot save the statements for future use and we have to retype
the statements to run them again.
Script mode: Script mode allows us to write more than one instruc on in a file called Python
source code file that can be executed.

 In the script mode, we can write a Python program in a file, save it and then use the
interpreter to execute it.
 Python scripts are saved as files where file name has extension “.py”.
 By default, the Python scripts are saved in the Python installa on folder.
 While working in the script mode, a er saving the file, click [Run]->[Run Module] from the
menu as shown in Figure.
Python source code file

, Execu on of Python in Script mode using IDLE




Output of a program executed in script mode




Python Keywords:
Keywords are reserved words. Also known as pre-defined word.
Each keyword has a specific meaning to the Python interpreter, and we can use a keyword in our
program only for the purpose for which it has been defined.
As Python is case sensitive, keywords must be written exactly as given in Table.

False class finally is return
None continue for lambda try
True def global not with
and del if or yield
as elif from nonlocal while
assert else import pass
break except in raise


Identifiers:
Name given to programming element known as Identifier.
In programming languages, identifiers are names used to identify a variable, function, or other
entities in a program.
€7,45
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur
Seller avatar
manjunathgowdaks

Faites connaissance avec le vendeur

Seller avatar
manjunathgowdaks
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
Nouveau sur Stuvia
Membre depuis
2 mois
Nombre de followers
0
Documents
1
Dernière vente
-

0,0

0 revues

5
0
4
0
3
0
2
0
1
0

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions