Computer Science: Term I

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

ERNY MEMORIAL SENIOR SECONDARY SCHOOL

Term I
COMPUTER SCIENCE

NAME: Mohd Anas


CLASS: 12-A
ROLL NO: 23
BOARD ROLL NO:
ACADEMIC YEAR: 2021-22
-

1
CERTIFICATE
This is to certify that Master Mohd Anas of class
12-A has successfully completed the Computer Science
project on the topic TracePath under the guidance of
Rajeev Sir during the academic year 2021-22.

_____________ _____________
INTERNAL EXAMINER EXTERNAL EXAMINER

2
ACKNOWLEGMENT
I would like to express my special thanks of
gratitude to my teacher Mr. Rageev sir as well as
our principal Mrs. S.Putrana ma’am who gave me
golden opportunity to do this project of Computer
Science, which also helped me in doing a lot of
research and I came to know new things about it.
Without their help, guidance and support it would
be impossible to complete this project.
Secondly, I would also like to thank my parents and
friends who helped me a lot in finishing this
project within limited time. I am making this
project not only for marks but also to increase my
knowledge.
Once again thanks to all who helped me in doing
this project.

3
INDEX
Sr. No. Particulars Page

1. TOPIC: Tracepath 5

2. Introduction of Project 6

3. Hardware & Software 11


requirement

4. Functions and 12
Modules

5. Flow of Project 14

6. Bibliography 18

4
-----------------------------

TracePath
MAKE DEBUGGING EASY
-----------------------------

5
Introduction to Project

DEBUGGING
Debugging is a cyclic activity involving
execution testing and code correction.
The testing that is done during debugging
has a different aim than final module testing.
Final module testing aims to demonstrate
correctness, whereas testing during
debugging is primarily aimed at locating errors.
This difference has a significant effect on the
choice of testing strategies.
6
How much time debugging tooks?

Debugging is a bit of a bad name, as it includes


many different things. It includes:

• Stepping through code to see what values are at


a given point in time to find out what you need
to do to make it work.

• Testing code to find issues with it.

• Tracing through to find the cause of an


issues/bug/side-effect.

• Testing code to see if it functions correctly.

All of these are considered to be debugging by


some. They are things all programmers do,
because perfect code rarely happens.
7
I’d estimate that I spent between 5% and 70% of
my time debugging each day. The number ramps
up as projects near completion, and as deliverables
get nailed down. It is very rare that I get to spend
a full day not looking at a debug output, though
there have been full days staring at one, stepping
through to find where something happens.

From this we get that debugging is time consuming

Preconditions for Effective Debugging

In order to avoid excessive time spent on


debugging, the programmer should be mentally
prepared for the effort. The following steps are
useful to prepare for debugging.

• Understand the design and algorithm - If you


are working on a module and you do not

8
understand its design or its algorithms, then
debugging will be very difficult. If you don't
understand the design then you can't test
the module because you do not know what it is
supposed to do. If you don't understand
the algorithms then you will find it very difficult
to locate the errors that are revealed by testing.
A second reason for the importance of
understanding algorithms is that you may need
that understanding in order to construct good
test cases. This is especially true for algorithms
for complex data structures.

• Check correctness - There are several methods


for checking correctness of an implementation
prior to execution.

• Correctness proofs - One useful code check is

9
to examine code using the logical methods of
correctness proofs.
• Code tracing - Often, errors can be detected by
tracing through the execution of various calls to
module services, starting with a variety of initial
conditions for the module. For poorly understood
psychological reasons, tracing works best if you are
describing your tracing to someone else. In order
to be effective, tracing of a procedure or function
should be done assuming that calls to other
procedures and functions work correctly, even if
they are recursive calls. If you trace into a called
procedure or function then you will find yourself
dealing with too many levels of abstraction. This
usually leads to confusion. If there is any doubt
about the called procedures and functions then
they can be traced separately to verify that they
perform according to specifications. Again, tracing
10
may not catch all errors, but it can enhance your
understanding of algorithms

• Anticipate errors - Unfortunately, humans make


errors with correctness arguments and sometimes
miss cases in code tracing, and peers don't
always catch errors either.

Our Project gave you the great advantage over these


two :-
----------------------------------------------

1• UNDERSTANDING THE DESIGN AND ALGORITHM


2• CODE TRACING
------------------------------------

11
HARDWARE SOFTWARE
REQUIREMENT

SYSTEM:
OS- Windows 7 Professional 32-Bit (6.1, Build
7601)
Language: English
System Manufacture-Gigabyte Technology
Co., Ltd
BIOS:-BIOS Date: 08/03/13 09:45:07
Ver: 04.06.05
Processor:- Intel (R) Core ™ i3-3220CPU
@3.30 GHz (4CPUs), ~3.3GHz
Memory: 2048 MB RAM
DirectX Version: Direct XII

12
DISPLAY DEVICE:
Name:-Intel(R) HD Graphics
Manufacturer: - Gigabyte Technology
Co., Ltd
Chip Type: - Intel(R) HD Graphics Family
DAC Type:-Internal
Approx. Total Memory:-15KB
Current Display mode: - 1336 X 768
(32 Bit)(60Hz)
Monitor:- Generic PnP Monitor
DRIVER:
Main Driver: - igdumdim 32.dll,igd loiumd
32.dll,igd lo
Version:-10.18.10.3345
Date:-10/28/13
WHQL logo’s:- Yes
DDI Version: II
Driver Model:-WDDM 1.1
13
FUNCTIONS AND MODULES

MODULES
import os:
The OS module in Python provides functions for
interacting with the
operating system. OS comes under Python’s standard
utility modules. This
module provides a portable way of using operating
system-dependent
functionality. The *os* and *os.path* modules
include many functions to
interact with the file system.

14
import time:
Python has defined a module, “time” which allows us
to handle various
operations regarding time, its conversions and
representations, which find
its use in various applications in life. The beginning of
time is started
measuring from 1 January, 12:00 am, 1970 and this
very time is termed as
“epoch” in Python.

FUNCTIONS
system(): Used to interact with System prompt
Here, we used it to clear the prompt.

sleep(): Used to delay the flow of program.

15
FLOW OF THE PROJECT

What is the project?

This project will trace your whole program


line by line just by simply showing where is
your program's control.

How run this?

import tracepath
Then
Use trace module to make a traced copy of your
program just by simply passing url as the agrument
for trace module.

Then in the last,


import treaced file to watch it out.

16
The Project works on the priciple of creating a
file of your code with print statement below or
above each line of code without effecting the
actual meaning of code.

When each line get interpreted by interpreter


just after or before that, a print statement printed
that line(string) with “>>>” traced sign to get the
trace of the code.

if(True):
>>> print(“just chilling”) <<<
else:
print(“bad mood”)

17
BIBLIOGRAPHY

To develop this project many


references were used:

1. COMPUTER SCIENCE TEXTBOOK CLASS


12: SUMITA ARORA
2. https://www.google.com
3. https://www.python.org.in
4. https://www.w3schools.com/

18

You might also like