Commit Graph

3 Commits

Author SHA1 Message Date
Cory Dean Chung ead11bc16c For triangle, I made it create an equilateral
triangle with side length side_length. For
rectangle, I made it alternate going forward
height and width, turning right 90 degrees each
time.

Checkpoint 1: Already submitted

Checkpoint 2:
A function is like a variable in that it is a
name for something else. Functions could be
helpful in breaking down a big, hard problem
into smaller, easier problems, which can each
be represented by a function, as a big problem
could be rewritten as a series of function
calls. Adding fractions might be an example.
To add the fractions, a common denominator
needs to be found, the fractions have to be
changed into equivalent fractions with the
common denominator, the numerators are added,
and then the fractions are simplified. each
of these four steps might itself be a function
and the adding of fractions could be written
as calling those four functions.
2023-07-19 20:50:07 -04:00
Cory Dean Chung ab6c453892 In greetings.py, I changed the first line to
my_name = input("What is your name?") as instructed.
In circle_area.py, I finished the program by assigning
3.141592653 to pi and then printing the value of
pi * radius * radius, which is the area of a circle.

Checkpoint 1:
A value is what it is, but a name refers to a value.
An everyday life situation where it's important to
distinguish between a name and the value it refers to
is when multiple people have the same name. For example,
I went to high school with two people who were both
Kevin Ng. Despite the jokes, they weren't interchangable,
and the relationships I had with each were different.
Variables can be useful in programming for a number
of reasons. In the assignment text, pi was assigned
the value 3.141592653. pi is much quicker and easier
to type. Another reason a variable might be useful is
because the value a name refers to might change. For
example, the price of a fruit might change from $1 to $2,
but we'd still refer to monetary amount as price.

Checkpoint 2: Not there yet! Was asked to submit at
checkpoint 1.
2023-07-19 16:20:02 -04:00
cchung f473f36a09 Initial commit 2023-07-19 20:14:06 +00:00