Python Programming: A Comprehensive Guide to Algorithms, Paradigms, and Debugging
VerifiedAdded on 2024/05/21
|33
|4126
|373
AI Summary
This report delves into the fundamentals of Python programming, covering essential concepts such as algorithms, programming paradigms, and debugging techniques. It provides a comprehensive overview of procedural, object-oriented, and event-driven programming paradigms, highlighting their characteristics and relationships. The report also demonstrates the implementation of basic algorithms in code using the IDLE (Integrated Development and Learning Environment) and explores the debugging process, emphasizing its importance in developing secure and robust applications. The report concludes with a discussion of coding standards and their role in maintaining code quality and readability.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.

Programming
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

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

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
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

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

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

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
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

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

LO3 Implement basic algorithms in code using an IDE
P3 Write a program that implements an algorithm using an IDE.
IDE referred the integrated development environment which makes a developer more
productive. It offers compiler, debugger, and text-editor, context-sensitive that are work with
different type of SDKs. IDE is most used by the eclipse. It is a platform where write the code
and executed. Here, I have shown the program input and out which are implemented
according to given case study.
Menu 1: design the hello program
Figure 2: Input for menu 1
Menu 2: design the Name program with special character
Figure 3: Input for menu 2
Menu 3: design the program for Rectangles’ space and perimeter
12
P3 Write a program that implements an algorithm using an IDE.
IDE referred the integrated development environment which makes a developer more
productive. It offers compiler, debugger, and text-editor, context-sensitive that are work with
different type of SDKs. IDE is most used by the eclipse. It is a platform where write the code
and executed. Here, I have shown the program input and out which are implemented
according to given case study.
Menu 1: design the hello program
Figure 2: Input for menu 1
Menu 2: design the Name program with special character
Figure 3: Input for menu 2
Menu 3: design the program for Rectangles’ space and perimeter
12
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 4: Input for menu 3
Menu 4: design the program of time calculation for the journey
Figure 5: Input for menu 4
Menu 5: design the program for exam result Analysis
Figure 6: Input for menu 5
13
Menu 4: design the program of time calculation for the journey
Figure 5: Input for menu 4
Menu 5: design the program for exam result Analysis
Figure 6: Input for menu 5
13

Menu 6: design the program for Random Number Generator
Figure 7: Input for menu 6
Menu 7: design the program array component addition
Figure 8: Input for menu 7
Menu 8: design the game program for Bouncing Ball
Figure 9: Input for menu 8
Menu 9: design the program for Maths practice queries
14
Figure 7: Input for menu 6
Menu 7: design the program array component addition
Figure 8: Input for menu 7
Menu 8: design the game program for Bouncing Ball
Figure 9: Input for menu 8
Menu 9: design the program for Maths practice queries
14

Figure 10: Input for menu 9
Menu 10: design the program to stop the process
15
Menu 10: design the program to stop the process
15
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

Figure 11: Input for menu 10
M3 Use the IDE to manage the development process of the program.
IDLE (Integrated Development and Learning Environment) is an environment where
designed the program according to user and system need. It gives programming code
platforms which are independent of the different type of operating systems such as a window,
Unix, Mac, and Linux(Dawson, 2017). Python used Microsoft visual studio 2017 as IDLE
which developed purely in the Python. Below I have shown the Application coding on the
Python IDLE
16
M3 Use the IDE to manage the development process of the program.
IDLE (Integrated Development and Learning Environment) is an environment where
designed the program according to user and system need. It gives programming code
platforms which are independent of the different type of operating systems such as a window,
Unix, Mac, and Linux(Dawson, 2017). Python used Microsoft visual studio 2017 as IDLE
which developed purely in the Python. Below I have shown the Application coding on the
Python IDLE
16

Figure 12: IDLE implemented program Part 1
Figure 13: IDLE implemented program Part 2
17
Figure 13: IDLE implemented program Part 2
17

Figure 14: IDLE implemented program Part 3
Figure 15: IDLE implemented program Part 4
18
Figure 15: IDLE implemented program Part 4
18
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 16: IDLE implemented program Part 5
Figure 17: IDLE implemented program Part 6
19
Figure 17: IDLE implemented program Part 6
19

Figure 18: IDLE implemented program Part 7
Output:
20
Output:
20

Figure 19menu system
Figure 20 menu option1
21
Figure 20 menu option1
21
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

Figure 21 menu option2
Figure 22menu option3
Figure 23 menu option4
22
Figure 22menu option3
Figure 23 menu option4
22

Figure 24menu option5
Figure 25 Menu option6
23
Figure 25 Menu option6
23

Figure 26 Menu option7
Figure 27 menu option8
24
Figure 27 menu option8
24
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 28 menu option9
Figure 29 menu option 10
25
Figure 29 menu option 10
25

LO4 Determine the debugging process and explain the importance of a
coding standard
P4 Explain the debugging process and explain the debugging facilities available
in the IDE
Debugging process: Python uses Microsoft visual studio as Python IDLE which has pre-
installed tool for the Debugging process. Here, I have explained the Debugging process steps
such as
1. Start Python IDLE which is open the shell window. It is a default window. After that
open the python program for the debugging process
Figure 30: Debugging process Phase one
2. In the shell window, debugger clicked on the debug option. There is open a new
window which is known debug control window. Shell window showed the debugging
status such as ON condition.
26
coding standard
P4 Explain the debugging process and explain the debugging facilities available
in the IDE
Debugging process: Python uses Microsoft visual studio as Python IDLE which has pre-
installed tool for the Debugging process. Here, I have explained the Debugging process steps
such as
1. Start Python IDLE which is open the shell window. It is a default window. After that
open the python program for the debugging process
Figure 30: Debugging process Phase one
2. In the shell window, debugger clicked on the debug option. There is open a new
window which is known debug control window. Shell window showed the debugging
status such as ON condition.
26

Figure 31: Debugging process Phase two
3. Debugger set the breakpoint in the program. Breakpoint checks the bug, error, and
flats in the program so clicked the mouse right button and set the breakpoint in the
program according to needs. There will be open a new window which asks for
clarification or set the breakpoint.
Figure 32: Debugging process Phase three
4. The code contains a number of the breakpoint. It will be highlighted code such as it
shows line background yellow color.
5. The debugger can be set breakpoint during the debugging process. There are need to
pause the code on the first line and set the breakpoint.
6. After that, source code window run the breakpoint
27
3. Debugger set the breakpoint in the program. Breakpoint checks the bug, error, and
flats in the program so clicked the mouse right button and set the breakpoint in the
program according to needs. There will be open a new window which asks for
clarification or set the breakpoint.
Figure 32: Debugging process Phase three
4. The code contains a number of the breakpoint. It will be highlighted code such as it
shows line background yellow color.
5. The debugger can be set breakpoint during the debugging process. There are need to
pause the code on the first line and set the breakpoint.
6. After that, source code window run the breakpoint
27
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

7. Application code will be successfully executed if the code will not contain any
error("Debugging under IDLE", n.d.).
P5 Outline the coding standard you have used in your code.
A coding standard is a collection of rules that are followed by the programming Language. It
defines for syntax, methods, variable, function, and practices.Programming principles,
naming conventions, comments, white spacing, a blank line, and indention are the main part
of the Coding standard. When a developer designs the program, application, or software with
the Coding standard then, it maintains the quality. The organization should be followed the
Coding standard set of rule. Here, I have explained Coding standard for python language
which is used in the program
1. The spacing of Line: Python functions and methods contain two Line spacing for the
separation. Three Line spacing is used by the class definitions for the separation.
Variable does not hold Line spacing for separation.
Figure 33: coding standard 1
2. Docstrings: multi-line docstring and single line docstring are two type of the
docstrings which used in the python programming.
28
error("Debugging under IDLE", n.d.).
P5 Outline the coding standard you have used in your code.
A coding standard is a collection of rules that are followed by the programming Language. It
defines for syntax, methods, variable, function, and practices.Programming principles,
naming conventions, comments, white spacing, a blank line, and indention are the main part
of the Coding standard. When a developer designs the program, application, or software with
the Coding standard then, it maintains the quality. The organization should be followed the
Coding standard set of rule. Here, I have explained Coding standard for python language
which is used in the program
1. The spacing of Line: Python functions and methods contain two Line spacing for the
separation. Three Line spacing is used by the class definitions for the separation.
Variable does not hold Line spacing for separation.
Figure 33: coding standard 1
2. Docstrings: multi-line docstring and single line docstring are two type of the
docstrings which used in the python programming.
28

Figure 34: coding standard 2
3. Comments: It plays a major role in understanding the code. It writes with source code
separate below or above the line. Comments should write the same line with the code.
It does not execute the program. Single line and multi-line are two types of
Comments.
Figure 35: coding standard 3
4. Balancing the Parenthesis: Programming using the Parenthesis eliminates ambiguity
form the source code. Without Parenthesis programming Expressions may be
complicated which difficult to understand(Filippov, 2014).
29
3. Comments: It plays a major role in understanding the code. It writes with source code
separate below or above the line. Comments should write the same line with the code.
It does not execute the program. Single line and multi-line are two types of
Comments.
Figure 35: coding standard 3
4. Balancing the Parenthesis: Programming using the Parenthesis eliminates ambiguity
form the source code. Without Parenthesis programming Expressions may be
complicated which difficult to understand(Filippov, 2014).
29

Figure 36: coding standard 4
M4 Evaluate how the debugging process can be used to help develop more
secure, robust applications.
Python application must be secured and rousted so Python IDLE support the debugging
process. It used a number of techniques which may be contained complex records, variable
stage change according to time, support divide and conquer approach, and start the process in
the well-known state of the program. Debugging process should be enhanced the code quality
and troubleshoot process. It designed an error-free application. We can say, it helps to design
error free applications which give the problem solution. The application is secure, robust.
30
M4 Evaluate how the debugging process can be used to help develop more
secure, robust applications.
Python application must be secured and rousted so Python IDLE support the debugging
process. It used a number of techniques which may be contained complex records, variable
stage change according to time, support divide and conquer approach, and start the process in
the well-known state of the program. Debugging process should be enhanced the code quality
and troubleshoot process. It designed an error-free application. We can say, it helps to design
error free applications which give the problem solution. The application is secure, robust.
30
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Conclusion
I have designed the report on the report on Python programming that enhanced the
programming knowledge in the python different areas. I have used Microsoft visual studio
2017 as python IDLE that gives a platform for the programming development. A python is an
object-oriented Language that is followed the oops concept.
In the report, I have explained about the algorithm process with flowchart and also give an
algorithm for menu 7 and 8. After that, I have discussed the programming paradigms such
OOPs, EDP and POPs and also tell about the Python programming paradigm. Further, Python
program is implemented on IDLE and also show their input and output on the IDLE. In the
end, I explained the coding standards and debugging process for the Python Programming
which are used during the Python Programming. Python Programming is successfully
implemented according to given case study and run without error.
31
I have designed the report on the report on Python programming that enhanced the
programming knowledge in the python different areas. I have used Microsoft visual studio
2017 as python IDLE that gives a platform for the programming development. A python is an
object-oriented Language that is followed the oops concept.
In the report, I have explained about the algorithm process with flowchart and also give an
algorithm for menu 7 and 8. After that, I have discussed the programming paradigms such
OOPs, EDP and POPs and also tell about the Python programming paradigm. Further, Python
program is implemented on IDLE and also show their input and output on the IDLE. In the
end, I explained the coding standards and debugging process for the Python Programming
which are used during the Python Programming. Python Programming is successfully
implemented according to given case study and run without error.
31

Reference:
Allen, S. (2016). Comparative Study of Programming Languages. Slideplayer.
Retrieved 29 April 2018, from http://slideplayer.com/slide/6047961/
Bush, j. (2016). Order. Apessay. Retrieved 29 April 2018, from
https://apessay.com/order/?rid=cc49f4f3231bb03f
Cameron, L. (2015). OBJECT ORIENTED PROGRAMMING. Slideplayer.
Retrieved 29 April 2018, from http://slideplayer.com/slide/5758470/
dawson, A. (2017). Python's IDLE editor: How to Use. Annedawson. Retrieved 29
April 2018, from http://www.annedawson.net/Python_Editor_IDLE.htm
Debugging under IDLE. Cs uky. Retrieved 29 April 2018, from
https://www.cs.uky.edu/~keen/help/debug-tutorial/debug.html
Filippov, D. (2014). Write Clean, Professional, Maintainable, Quality Code in Python.
Blog.jetbrains. Retrieved 29 April 2018, from
https://blog.jetbrains.com/pycharm/2014/06/write-clean-professional-maintainable-
quality-code-in-python/
Gupta, R. (2015). Python. Slideshare. Retrieved 29 April 2018, from
https://www.slideshare.net/RohanGupta50/pythonthe-programming-language
Rajinikanth. Data Structures. Btechsmartclass. Retrieved 29 April 2018, from
http://btechsmartclass.com/DS/U1_T1.html
32
Allen, S. (2016). Comparative Study of Programming Languages. Slideplayer.
Retrieved 29 April 2018, from http://slideplayer.com/slide/6047961/
Bush, j. (2016). Order. Apessay. Retrieved 29 April 2018, from
https://apessay.com/order/?rid=cc49f4f3231bb03f
Cameron, L. (2015). OBJECT ORIENTED PROGRAMMING. Slideplayer.
Retrieved 29 April 2018, from http://slideplayer.com/slide/5758470/
dawson, A. (2017). Python's IDLE editor: How to Use. Annedawson. Retrieved 29
April 2018, from http://www.annedawson.net/Python_Editor_IDLE.htm
Debugging under IDLE. Cs uky. Retrieved 29 April 2018, from
https://www.cs.uky.edu/~keen/help/debug-tutorial/debug.html
Filippov, D. (2014). Write Clean, Professional, Maintainable, Quality Code in Python.
Blog.jetbrains. Retrieved 29 April 2018, from
https://blog.jetbrains.com/pycharm/2014/06/write-clean-professional-maintainable-
quality-code-in-python/
Gupta, R. (2015). Python. Slideshare. Retrieved 29 April 2018, from
https://www.slideshare.net/RohanGupta50/pythonthe-programming-language
Rajinikanth. Data Structures. Btechsmartclass. Retrieved 29 April 2018, from
http://btechsmartclass.com/DS/U1_T1.html
32
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
© 2024 | Zucol Services PVT LTD | All rights reserved.