Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Overig

Basic of python

Beoordeling
-
Verkocht
-
Pagina's
28
Geüpload op
23-06-2024
Geschreven in
2023/2024

Easy to write, program can be writing in simple language, easy to understand, i was very easy comparing to other language like c, c++, java etc.....

Instelling
Vak

Voorbeeld van de inhoud

https://www.poriyaan.in/ https://eee.poriyaan.in/
DATA, EXPRESSIONS, STATEMENTS
PROGRAM Problem Solving and Python Programming

The most important skill for a computer Engineer is problem solving. Problem solving
means the ability to formulate problem, think creatively about solution clearly and accurately.
The process of learning to program is an excellent opportunity to practice Problem solving skills.
“A program is a sequence of instructions that specifies how to perform a computation” .The
computation might be mathematical i e Solving equations, Finding the roots of polynomial,




/
in
symbolic computation such as searching and replacing text in a document.




n.
Basic Instruction in Language
Input: Get data from Keyboard.




aa
Output: Display data on the screen
Math: Perform the mathematical operations.



riy
Conditional Execution: Check condition and execute certain code.
Repetition: Perform some action repeatedly.
o
.p
INTRODUCTION
w

Python
w


ython is a high level programming language like C, C++ designed to be easy to read,
//w



and less time to write. It is an open source and it is an interpreter which directly executes the
program without creating any executable file. Python is portable which means python can run on
s:




different platform with less or no modifications.
tp




Features of Python:
ht




 Python is publicly available open source software.
 Python is easy to learn.
 Python is easy to read.
 Python is easy to maintain.
 Python provides automatic memory management.
 Python is portable.
 Python support database and GUI(Graphical User Interface)

, https://www.poriyaan.in/ https://eee.poriyaan.in/
PYTHON INTERPRETER AND INTERACTIVE MODE
Python Interpreter
Python Interpreter translates high level instruction into an immediate form of machine
level language. It executes instructions directly without compiling.

Interpreter
Source Code (or) Source Code
Intermediate




/
in
n.
The Python interpreter is usually installed in C:/Program Files/Python3.6. In windows
operating python can also be found in the start menu. All Programs Python 3.6  Python 3.6




aa
(Shell) and Python IDLE.
Python Interactive mode



riy
 Interactive mode is a command line which gives immediate feedback for each statement.
o
Python interactive mode can be start by two methods - Python 3.6 (Shell) and Python
.p
IDLE.
 Python 3.6 (Shell), A prompt will appear and it usually have 3 greater than signs (>>>).
w

Each Statements can be enter after this (>>>) symbol. For continuous lines three dots (…)
w


will represent the multiple lines.
//w



 Python IDLE (Integrated Development for Learning Environment) which provides a user
friendly console to the python users. Different colors are used to represent different
s:




keywords.
tp




 IDLE starts by python version, after a line (>>>) three greater than symbols will be
displayed. The statements will be executed in that line.
ht




Example:
>>> 1+1
2
>>>5+10
15
In Script mode
 In script mode, type python program in a file and store the file with .py extension and use
the interpreter to execute the content of the file which is called a script.Working in script
mode is convenient for testing small piece of code because you can type and execute
them immediately, But for more than few line we can use script since we can modify and
execute in future.




Download Binils Android App in Playstore Download Photoplex App

, https://www.poriyaan.in/ https://eee.poriyaan.in/
Debugging
 Programming is error –prone, programming errors are called bugs and process of tracking
them is called debugging.
 Three kinds of error can occur in a program:
o Syntax Error
o Runtime Error
o Semantic error.




/
in
Syntax error:
 Syntax refers to the structure of a program and rules about the structure. Python can only




n.
execute a program if the syntax is correct otherwise the interpreter display an error




aa
message.
Runtime Error:



riy
 The error that occurs during the program execution is called run time error.
Semantic Error:
o

.p
The computer will not generate any error message but it will not do the right thing since
the meaning of the program is wrong.
w

Integrated Development Environment (IDE)
w


We can use any text editing software to write a Python script file. We just need to save it
//w



with the .py extension. IDE is a piece of software that provides useful features like code hinting,
syntax highlighting and checking, file explorers etc. to the programmer for application
development.
s:




IDLE is a graphical user interface (GUI) that can be installed along with the Python
tp




programming language.
ht




Example:
 Type the following code in any text editor or an IDE and save it as helloWorld.py

print("Hello world!")

To run the script, type python helloWorld.py in the command window and the output as
follows:
Hello world!

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
23 juni 2024
Aantal pagina's
28
Geschreven in
2023/2024
Type
OVERIG
Persoon
Onbekend

Onderwerpen

$8.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
arunkumar30

Maak kennis met de verkoper

Seller avatar
arunkumar30 University College of engineering, BIT campus, trichy
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
1 jaar
Aantal volgers
0
Documenten
3
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen