You are on page 1of 16

IT PROJECT

Name:

Class:

School:

Topic:

Date:

1
Contents:
• Acknowledgement
• Introduction
• Requirements
• Codes
• Outputs
• Scope
• Conclusion
• Bibliography

2
Acknowledgement:
I would like to thank my IT teacher Mr.
Ali Murtaza as well as the principal of
my school, Mr. Arul Dharmaraj
Thomas, for giving me the golden
opportunity to make this wonderful
project about

3
Introduction:
This project will be about outputting
asterisks (they will be referred to as
stars for the rest of this project) with
each line having more stars. I chose
this topic because I believe that the
topic can be used in many versatile
ways despite such limited uses.

4
Requirements:
• Hardware: To get started with
programming, one must have the
most basic essentials: mouse,
monitor and keyboard. The mouse
and the keyboard are both input
devices i.e, they give the computer
data. A mouse can point and click
buttons whereas a keyboard can
type in letters and numbers. A
monitor is an output device, and it
is used to show the user what is
happening with the computer, load
videos and pictures, show code etc.

5
• Software: There are many types of
software used to run code in many
different languages. For this project,
python will be used. Python is one
of the most commonly used
programming languages due to its
very beginner-friendly style of
coding and its various applications.

6
Codes:
This code is uses for loops to output
stars in increasing order.

The first line uses a for loop for the


variable “i” so that it is used in the
code with 5 different values in 5
different instances (1 , 2 , 3 , 4 , 5). In
the second line, another for loop for
the variable “j” is used, but this time it
uses every value from 1 to i. Hence, for
every loop of i, the possible values for j
increases. In the third and fourth

7
lines, the program prints the stars j
amount of times. Due to how the for
loop for j works, the amount of stars
printed will increase every time.

This code can be further refined using


the concept of concatenation of a
string. When a string is multiplied by an
integer, the result will be that string
but copied the given amount of times.
This code works almost exactly the
same as the last one, except the stars
increase with every loop for i instead.

8
Output:

9
Scope:
This code can be further improved by
making the value of the range of i a
result of user input, hence the user can
print any amount of stars as he
pleases.

Furthermore, extra lines of code can be


added to increase the width and height
of each star. If we let two variables
“width” and “height” be added, then
we can increase the versatility of the
code in the following way:

10
(For this section, width will be referred
to as w and height as h)
An extra loop for j is added so that
every line of stars is printed h times, to
signify the heights of each star. Also,
each star is concatenated w times as
well; if every star is w times wider then
each line will be w times longer.

The following two pictures show


outputs of the code:

11
12
Finally, we can give the user the choice
to make the stars be either in
ascending or descending order. If we
add another value “order” and use an if
loop to let the program choose from
two separate methods of printing, this
job can be easily done.

13
These are the outputs given by the
program:

14
Conclusion:
Using python, one can easily make
small programs with limited commands
as practice to become better at coding,
with this project being a good example
of it.

15
Bibliography:
https://www.w3schools.com/
https://www.geeksforgeeks.org/
https://www.wikipedia.org/
https://www.youtube.com/

16

You might also like