Python Programming: Algorithm Implementation, IDE Features & Debugging
VerifiedAdded on 2024/05/21
|33
|4126
|373
Report
AI Summary
This report provides a comprehensive overview of Python programming, starting with the definition and implementation of basic algorithms. It explores procedural, object-oriented, and event-driven programming paradigms, analyzing the features of an Integrated Development Environment (IDE) and demonstrating algorithm implementation in Python using IDLE. The report details the debugging process within the IDE, emphasizing the importance of coding standards for developing secure and robust applications. Input and output evidence are provided, along with a discussion of coding standards used in the application, offering a detailed insight into Python programming practices and development processes. Desklib provides past papers and solved assignments for students.

Programming
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Table of Contents
Introduction:...............................................................................................................................4
LO1 Define basic algorithms to carry out an operation and outline the process of
programming an application......................................................................................................5
P1 Provide a definition of what an algorithm is and outline the process of building an
application..............................................................................................................................5
M1 Determine the steps taken from writing code to execute.................................................6
LO2 Explain the characteristics of procedural, object-orientated and event-driven
programming, conduct an analysis of a suitable Integrated Development Environment (IDE) 7
P2 Give explanations of what procedural, object-orientated and event-driven paradigms
are; their characteristics and the relationship between them..................................................7
M2 Analyse the common features that a developer has access to in an IDE.......................10
LO3 Implement basic algorithms in code using an IDE..........................................................12
P3 Write a program that implements an algorithm using an IDE........................................12
M3 Use the IDE to manage the development process of the program.................................16
LO4 Determine the debugging process and explain the importance of a coding standard......26
P4 Explain the debugging process and explain the debugging facilities available in the IDE
..............................................................................................................................................26
P5 Outline the coding standard you have used in your code...............................................28
M4 Evaluate how the debugging process can be used to help develop more secure, robust
applications..........................................................................................................................30
Conclusion................................................................................................................................31
Reference:................................................................................................................................32
1
Introduction:...............................................................................................................................4
LO1 Define basic algorithms to carry out an operation and outline the process of
programming an application......................................................................................................5
P1 Provide a definition of what an algorithm is and outline the process of building an
application..............................................................................................................................5
M1 Determine the steps taken from writing code to execute.................................................6
LO2 Explain the characteristics of procedural, object-orientated and event-driven
programming, conduct an analysis of a suitable Integrated Development Environment (IDE) 7
P2 Give explanations of what procedural, object-orientated and event-driven paradigms
are; their characteristics and the relationship between them..................................................7
M2 Analyse the common features that a developer has access to in an IDE.......................10
LO3 Implement basic algorithms in code using an IDE..........................................................12
P3 Write a program that implements an algorithm using an IDE........................................12
M3 Use the IDE to manage the development process of the program.................................16
LO4 Determine the debugging process and explain the importance of a coding standard......26
P4 Explain the debugging process and explain the debugging facilities available in the IDE
..............................................................................................................................................26
P5 Outline the coding standard you have used in your code...............................................28
M4 Evaluate how the debugging process can be used to help develop more secure, robust
applications..........................................................................................................................30
Conclusion................................................................................................................................31
Reference:................................................................................................................................32
1

List of figure:
Figure 1: use of the algorithm in the program............................................................................6
Figure 2: Input for menu 1.......................................................................................................13
Figure 3: Input for menu 2.......................................................................................................13
Figure 4: Input for menu 3.......................................................................................................14
Figure 5: Input for menu 4.......................................................................................................14
Figure 6: Input for menu 5.......................................................................................................14
Figure 7: Input for menu 6.......................................................................................................15
Figure 8: Input for menu 7.......................................................................................................15
Figure 9: Input for menu 8.......................................................................................................15
Figure 10: Input for menu 9.....................................................................................................16
Figure 11: Input for menu 10...................................................................................................17
Figure 12: IDLE implemented program Part 1........................................................................18
Figure 13: IDLE implemented program Part 2........................................................................18
Figure 14: IDLE implemented program Part 3........................................................................19
Figure 15: IDLE implemented program Part 4........................................................................19
Figure 16: IDLE implemented program Part 5........................................................................20
Figure 17: IDLE implemented program Part 6........................................................................20
Figure 18: IDLE implemented program Part 7........................................................................21
Figure 19menu system.............................................................................................................22
Figure 20 menu option1...........................................................................................................22
Figure 21 menu option2...........................................................................................................23
Figure 22menu option3............................................................................................................23
Figure 23 menu option4...........................................................................................................23
Figure 24menu option5............................................................................................................24
Figure 25 Menu option6...........................................................................................................24
Figure 26 Menu option7...........................................................................................................25
Figure 27 menu option8...........................................................................................................25
Figure 28 menu option9...........................................................................................................26
Figure 29 menu option 10........................................................................................................26
Figure 30: Debugging process Phase one................................................................................27
Figure 31: Debugging process Phase two................................................................................28
Figure 32: Debugging process Phase three..............................................................................28
2
Figure 1: use of the algorithm in the program............................................................................6
Figure 2: Input for menu 1.......................................................................................................13
Figure 3: Input for menu 2.......................................................................................................13
Figure 4: Input for menu 3.......................................................................................................14
Figure 5: Input for menu 4.......................................................................................................14
Figure 6: Input for menu 5.......................................................................................................14
Figure 7: Input for menu 6.......................................................................................................15
Figure 8: Input for menu 7.......................................................................................................15
Figure 9: Input for menu 8.......................................................................................................15
Figure 10: Input for menu 9.....................................................................................................16
Figure 11: Input for menu 10...................................................................................................17
Figure 12: IDLE implemented program Part 1........................................................................18
Figure 13: IDLE implemented program Part 2........................................................................18
Figure 14: IDLE implemented program Part 3........................................................................19
Figure 15: IDLE implemented program Part 4........................................................................19
Figure 16: IDLE implemented program Part 5........................................................................20
Figure 17: IDLE implemented program Part 6........................................................................20
Figure 18: IDLE implemented program Part 7........................................................................21
Figure 19menu system.............................................................................................................22
Figure 20 menu option1...........................................................................................................22
Figure 21 menu option2...........................................................................................................23
Figure 22menu option3............................................................................................................23
Figure 23 menu option4...........................................................................................................23
Figure 24menu option5............................................................................................................24
Figure 25 Menu option6...........................................................................................................24
Figure 26 Menu option7...........................................................................................................25
Figure 27 menu option8...........................................................................................................25
Figure 28 menu option9...........................................................................................................26
Figure 29 menu option 10........................................................................................................26
Figure 30: Debugging process Phase one................................................................................27
Figure 31: Debugging process Phase two................................................................................28
Figure 32: Debugging process Phase three..............................................................................28
2
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Figure 33: coding standard 1....................................................................................................29
Figure 34: coding standard 2....................................................................................................30
Figure 35: coding standard 3....................................................................................................30
Figure 36: coding standard 4....................................................................................................31
3
Figure 34: coding standard 2....................................................................................................30
Figure 35: coding standard 3....................................................................................................30
Figure 36: coding standard 4....................................................................................................31
3
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Introduction:
Here, I will be designed a report on the Python programming. Python is an object-oriented
language that focused on OOPs. It works as high –level Language. In the report, I will design
a driven console application that will be based on the python language. I will be developed on
the Python IDLE. The report will be divided into four sections.
In the first section, application algorithm will be discussed with given case study. In the
second section, different the type of programming language will be explained such as event-
driven language, object-oriented language, and procedural language. There will be also
discussed the python language characters. In the third section of the report, the application
will be implemented on the IDLE and also showed input and output evidence. In the fourth
section, IDLE debugging process and coding standard will be explained for the given
application.
4
Here, I will be designed a report on the Python programming. Python is an object-oriented
language that focused on OOPs. It works as high –level Language. In the report, I will design
a driven console application that will be based on the python language. I will be developed on
the Python IDLE. The report will be divided into four sections.
In the first section, application algorithm will be discussed with given case study. In the
second section, different the type of programming language will be explained such as event-
driven language, object-oriented language, and procedural language. There will be also
discussed the python language characters. In the third section of the report, the application
will be implemented on the IDLE and also showed input and output evidence. In the fourth
section, IDLE debugging process and coding standard will be explained for the given
application.
4

LO1 Define basic algorithms to carry out an operation and outline the
process of programming an application
P1 Provide a definition of what an algorithm is and outline the process of
building an application.
Algorithm: it is an order of unambiguous commands that are used to solve the problem. It
may be implemented on the system as a program which takes input and gives the
output.Algorithms are dividing the problem into small parts or statements. The system used
the statement in the program as programming instructions. After the program executed, the
system gives the result for the problem. The program takes the input, process on the data
according to instructions after that gives finally result which are shown in below
diagram(Rajinikanth, n.d.).
Figure 1: use of the algorithm in the program
Source: (Rajinikanth, n.d.)
Algorithm Feathers
Input: Algorithm needs one or more input from the external.
Output: Algorithms have produced a result which is known as output.
Finiteness: Every Algorithm has a number of finite steps for solving the problem.
Definiteness: Algorithms contains a number of statement/instruction for solving the
problem which may unambiguous and clear.
Effectiveness: Algorithms instruction should be enough and feasible.
Algorithms for menu 7
5
process of programming an application
P1 Provide a definition of what an algorithm is and outline the process of
building an application.
Algorithm: it is an order of unambiguous commands that are used to solve the problem. It
may be implemented on the system as a program which takes input and gives the
output.Algorithms are dividing the problem into small parts or statements. The system used
the statement in the program as programming instructions. After the program executed, the
system gives the result for the problem. The program takes the input, process on the data
according to instructions after that gives finally result which are shown in below
diagram(Rajinikanth, n.d.).
Figure 1: use of the algorithm in the program
Source: (Rajinikanth, n.d.)
Algorithm Feathers
Input: Algorithm needs one or more input from the external.
Output: Algorithms have produced a result which is known as output.
Finiteness: Every Algorithm has a number of finite steps for solving the problem.
Definiteness: Algorithms contains a number of statement/instruction for solving the
problem which may unambiguous and clear.
Effectiveness: Algorithms instruction should be enough and feasible.
Algorithms for menu 7
5
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Input: Array elements
Output: Addition of array element
Algorithms;
Step 1: Process start
Step 2: Enter the Array in the program
Step 3: define a function for the array elements addition with loop
Step 4: Return the array elements addition (as result of all values)
Step 5: after that, there are define another function that passes array elements value for the
addition.
Step 6: show the array element addition with the help of function
Step 7: Process Stop
M1 Determine the steps taken from writing code to execute.
Algorithms for the Menu 8
Step 1: Process start
Step 2: Define a function the program for the problem and result
Step 3: initialization a variable for the level of height.
Step 4: bounce level is set on the zero.
Step 5: Apply the while loop for checking a condition such as level of height is less than min
height level limit
Step 6: Increasing the value of bounce level by 1 after each time of while loop execution
Step 7: level of height = 0.7 * level of height
Step 8: display the bounce number through an increment of bounce level during the while
loop execution
6
Output: Addition of array element
Algorithms;
Step 1: Process start
Step 2: Enter the Array in the program
Step 3: define a function for the array elements addition with loop
Step 4: Return the array elements addition (as result of all values)
Step 5: after that, there are define another function that passes array elements value for the
addition.
Step 6: show the array element addition with the help of function
Step 7: Process Stop
M1 Determine the steps taken from writing code to execute.
Algorithms for the Menu 8
Step 1: Process start
Step 2: Define a function the program for the problem and result
Step 3: initialization a variable for the level of height.
Step 4: bounce level is set on the zero.
Step 5: Apply the while loop for checking a condition such as level of height is less than min
height level limit
Step 6: Increasing the value of bounce level by 1 after each time of while loop execution
Step 7: level of height = 0.7 * level of height
Step 8: display the bounce number through an increment of bounce level during the while
loop execution
6
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Step 9: Process stop
LO2 Explain the characteristics of procedural, object-orientated and event-
driven programming, conduct an analysis of a suitable Integrated
Development Environment (IDE)
P2 Give explanations of what procedural, object-orientated and event-driven
paradigms are; their characteristics and the relationship between them
Have you ever wondered how procedural paradigm evolved into object-oriented paradigm
and event paradigm and what could be the relation between the three? Let’s start with
understanding them separately and thus looking into the relationship these three have.
• Procedural Paradigm: The concept used here is ‘Procedures’ which is also sometimes
called subprogram or functions. In simple words, procedures are the commands to be
executed and it can be called from anywhere. The best example of the language that uses this
paradigm is C language.
Characteristics:
1. The global data is being shared in many functions.
2. The large problems are distributed into smaller functions.
3. Data move from function to function freely.
4. The top-down approach is being followed in program designing.
5. There are no effective techniques available to secure data of the function (Allen, 2016).
• Object-oriented Paradigm: This has been developed to remove the flaws of Procedural
Paradigm. This paradigm treats Object as the critical element instead of procedure and thus it
does not allow data to freely flow around the system. The best example of the language that
uses this paradigm is C++.
Characteristics:
1. The main focus is on an object instead of methods.
2. This paradigm follows the bottom-up approach in program designing.
7
LO2 Explain the characteristics of procedural, object-orientated and event-
driven programming, conduct an analysis of a suitable Integrated
Development Environment (IDE)
P2 Give explanations of what procedural, object-orientated and event-driven
paradigms are; their characteristics and the relationship between them
Have you ever wondered how procedural paradigm evolved into object-oriented paradigm
and event paradigm and what could be the relation between the three? Let’s start with
understanding them separately and thus looking into the relationship these three have.
• Procedural Paradigm: The concept used here is ‘Procedures’ which is also sometimes
called subprogram or functions. In simple words, procedures are the commands to be
executed and it can be called from anywhere. The best example of the language that uses this
paradigm is C language.
Characteristics:
1. The global data is being shared in many functions.
2. The large problems are distributed into smaller functions.
3. Data move from function to function freely.
4. The top-down approach is being followed in program designing.
5. There are no effective techniques available to secure data of the function (Allen, 2016).
• Object-oriented Paradigm: This has been developed to remove the flaws of Procedural
Paradigm. This paradigm treats Object as the critical element instead of procedure and thus it
does not allow data to freely flow around the system. The best example of the language that
uses this paradigm is C++.
Characteristics:
1. The main focus is on an object instead of methods.
2. This paradigm follows the bottom-up approach in program designing.
7

3. Data here is hidden and cannot move freely around the system.
4. Objects that are created communicate through functions.
5. You can create new data and method whenever needed.
6. The program here is distributed in between objects.
7. Methods are tied to each other in a data structure.
Basic concepts on which object-oriented paradigm works are:
1. Objects i.e. it is an entity or a real-world element which has an identity that differentiates
it from other elements.
2. Classes i.e. blueprint or collection of objects is known as a class and an object is the
instant of class.
3. Encapsulation i.e. is binding of objects and methods together in one place. You cannot
access the elements from outside the class until you use the interface.
4. Polymorphism i.e. it means many forms. When one function works in different ways
with help of a different number of attributes.
5. Inheritance i.e. improves the reusability. It means one class inherits another class and
thus we can reuse the features and methods of that class in new class. The existing class is
called base class or parent class while the new class is called derived class or child class. “is-
a” relationship is defined by it. There are % types of inheritance- Single inheritance, Multiple
inheritance, Multilevel inheritance, Hierarchical inheritance and Hybrid inheritance.
6. Data Abstraction i.e. here only the relevant data is being shown by the programmer the
rest is hidden.
7. Message passing i.e. objects communicates through each other by passing messages and
invoking methods present in the class.
8. Dynamic Binding i.e. it means procedure calling to be linked with a particular method at
a runtime(Cameron, 2015).
• Event-driven Paradigm- In this paradigm events such as mouse click, messages from
other threads etc determines the flow of the program. This paradigm is mostly used in Web
8
4. Objects that are created communicate through functions.
5. You can create new data and method whenever needed.
6. The program here is distributed in between objects.
7. Methods are tied to each other in a data structure.
Basic concepts on which object-oriented paradigm works are:
1. Objects i.e. it is an entity or a real-world element which has an identity that differentiates
it from other elements.
2. Classes i.e. blueprint or collection of objects is known as a class and an object is the
instant of class.
3. Encapsulation i.e. is binding of objects and methods together in one place. You cannot
access the elements from outside the class until you use the interface.
4. Polymorphism i.e. it means many forms. When one function works in different ways
with help of a different number of attributes.
5. Inheritance i.e. improves the reusability. It means one class inherits another class and
thus we can reuse the features and methods of that class in new class. The existing class is
called base class or parent class while the new class is called derived class or child class. “is-
a” relationship is defined by it. There are % types of inheritance- Single inheritance, Multiple
inheritance, Multilevel inheritance, Hierarchical inheritance and Hybrid inheritance.
6. Data Abstraction i.e. here only the relevant data is being shown by the programmer the
rest is hidden.
7. Message passing i.e. objects communicates through each other by passing messages and
invoking methods present in the class.
8. Dynamic Binding i.e. it means procedure calling to be linked with a particular method at
a runtime(Cameron, 2015).
• Event-driven Paradigm- In this paradigm events such as mouse click, messages from
other threads etc determines the flow of the program. This paradigm is mostly used in Web
8
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Applications based on JavaScript and GUI. The example of the programming language that
uses this paradigm is C# or Visual Basics. Tasks that can be done in it develop, build, debug,
test, deploy, version control, DevOps, Performance Improvement.
Visual Studio support languages such as C#, C++, C, JavaScript, Visual Basic. It also works
well with third party application such as Cordova and Unity. Just get started with it by
installing it in your system. The latest update of Visual Studio is lightweight. It helps you to
install the workloads and thus making it smaller in size than ever thus the installation
performance has become better.
Characteristics of Event-driven paradigm:
1. Time-driven i.e. the code runs on time trigger at a specific time.
2. Service-oriented i.e. programs are written based on the services that are requested by the
users.
3. Pre-defined Functions i.e. already built function, so that the code will run as soon as it is
called.
4. Modularity i.e. different modules to carry out different tasks and each module works
differently.
5. Programming Libraries i.e. pre-compiled routines be it source code, templates, data files,
etc(Bush, 2016).
• The relationship between these three paradigms:
Object-oriented paradigm and event-driven paradigm can be used together. When these are
used together all the OOPs principles remain the whole. The control flow moves from one
object to another when a method is called. EDP provides a graphical user interface to write
commands, OOP provides the command in modules while PPP provides character user
interface to write commands.
OOP focuses on data, PPP focuses on procedures, EDP focuses on events or selecting user
interface. OOP is related to procedural while EDP is related to both procedural and data flow
and PPP is related to structured and imperative flow.
9
uses this paradigm is C# or Visual Basics. Tasks that can be done in it develop, build, debug,
test, deploy, version control, DevOps, Performance Improvement.
Visual Studio support languages such as C#, C++, C, JavaScript, Visual Basic. It also works
well with third party application such as Cordova and Unity. Just get started with it by
installing it in your system. The latest update of Visual Studio is lightweight. It helps you to
install the workloads and thus making it smaller in size than ever thus the installation
performance has become better.
Characteristics of Event-driven paradigm:
1. Time-driven i.e. the code runs on time trigger at a specific time.
2. Service-oriented i.e. programs are written based on the services that are requested by the
users.
3. Pre-defined Functions i.e. already built function, so that the code will run as soon as it is
called.
4. Modularity i.e. different modules to carry out different tasks and each module works
differently.
5. Programming Libraries i.e. pre-compiled routines be it source code, templates, data files,
etc(Bush, 2016).
• The relationship between these three paradigms:
Object-oriented paradigm and event-driven paradigm can be used together. When these are
used together all the OOPs principles remain the whole. The control flow moves from one
object to another when a method is called. EDP provides a graphical user interface to write
commands, OOP provides the command in modules while PPP provides character user
interface to write commands.
OOP focuses on data, PPP focuses on procedures, EDP focuses on events or selecting user
interface. OOP is related to procedural while EDP is related to both procedural and data flow
and PPP is related to structured and imperative flow.
9
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

According to my explanation, Python is an object-oriented programming language as it is
based on object creation. Since it is totally based on object creation, using traditional class
architecture for OOP, thus creating and using classes and method is an easy task. It follows
the most important concept of object-oriented programming language i.e. encapsulation,
inheritance, and polymorphism. Classes are created at runtime and can also be modified after
creation. All the programs are built around objects(Gupta, 2015).
M2 Analyse the common features that a developer has access to in an IDE.
Integrated Development Environment commonly called as IDE is an application that is used
in application development. It has a code editor, debugger, compiler, build automation tool,
class and object browser. It can be a stand-alone application or can work for one or many
applications also. IDEs help in faster setup, faster task development, etc. Languages that have
an IDE for them are Python, PHP, C, C++, Java, JavaScript, Perl, HTML, etc.
• Visual Studio 2017 IDE
Visual Studio is an IDE i.e., integrated development environment from Microsoft. It is used
to build websites, mobile applications, and other computer programs. It supports many
different programming languages.
It includes a code editor and debugger to support these many programming languages. You
can develop anything and it will work not only in Windows but also on iOS and Android.
Application for devices such as Azure, office, IOT, etc can also be developed using Visual
Studios.
• IDLE
IDLE or Integrated Development and Learning Environment is for Python. PyCharm is the
best IDE for Python as it makes complex code easy. It has its own terminal, line numbering
option is also there.
There are some features that IDLE has:
o It is coded purely in Python with help of Python GUI toolkit.
o It can work well in windows, UNIC, Mac.
10
based on object creation. Since it is totally based on object creation, using traditional class
architecture for OOP, thus creating and using classes and method is an easy task. It follows
the most important concept of object-oriented programming language i.e. encapsulation,
inheritance, and polymorphism. Classes are created at runtime and can also be modified after
creation. All the programs are built around objects(Gupta, 2015).
M2 Analyse the common features that a developer has access to in an IDE.
Integrated Development Environment commonly called as IDE is an application that is used
in application development. It has a code editor, debugger, compiler, build automation tool,
class and object browser. It can be a stand-alone application or can work for one or many
applications also. IDEs help in faster setup, faster task development, etc. Languages that have
an IDE for them are Python, PHP, C, C++, Java, JavaScript, Perl, HTML, etc.
• Visual Studio 2017 IDE
Visual Studio is an IDE i.e., integrated development environment from Microsoft. It is used
to build websites, mobile applications, and other computer programs. It supports many
different programming languages.
It includes a code editor and debugger to support these many programming languages. You
can develop anything and it will work not only in Windows but also on iOS and Android.
Application for devices such as Azure, office, IOT, etc can also be developed using Visual
Studios.
• IDLE
IDLE or Integrated Development and Learning Environment is for Python. PyCharm is the
best IDE for Python as it makes complex code easy. It has its own terminal, line numbering
option is also there.
There are some features that IDLE has:
o It is coded purely in Python with help of Python GUI toolkit.
o It can work well in windows, UNIC, Mac.
10

o It has a smart indent, multi-window editor (be it the Shell window or the Editor window).
o It also has a refractor option available in it.
o It has a debugger which can view any namespace and breakpoints.
o The syntax is highlighted in Python Shell.
o In python shell, there are two windows- interpreter window and program window.
o The interpreter of the IDLE will tell you if there is any mistake in syntax.
11
o It also has a refractor option available in it.
o It has a debugger which can view any namespace and breakpoints.
o The syntax is highlighted in Python Shell.
o In python shell, there are two windows- interpreter window and program window.
o The interpreter of the IDLE will tell you if there is any mistake in syntax.
11
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 33
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.