generated from mwc/lab_names
In the 1st section, I first changed chris to my name, then changed it to an input equation, then i changed the circle area code by putting in the number pi and the equation for the area of a circle and then printed that. In the second section I changed the traingle to make 60 degree turns because that would make a equaliateral triangle in my mind, then i realised to make a 60 degree intertior angle it has to turn 120 degrees so i changed that next, then i had the rectangle turn 90 degrees each time, i told the shapes files to do 2 different sized triangles and 1 rectangle. I ran it with test and with draw with and by its self
A value is something we want to use, either a number or an equation. A name is a what we use to refer to that value. A real life situation that comes to my mind, is a shopping cart, the value is something you push around a grocery store to collect grocery items. The name in my area is a shopping cart but i have heard others call it a buggie, a trolley, or a carriage, as the name of something can be changed. If you are using a name to refer to an equation like we did with the area of a circle, equations can get quite long and complicated to write, especailly on a computer, naming allows you to write it once but use it over and over again quickly and easily. It is exactly the same but instead of recalling one thing, it recalls a bunch of things to do together I would guess that we could use functions together for a big problem, solve one little problem with one fuction, a different little problem with a different function and so on I am having trouble thinking of an exmaple of this right now, but i look forward to learning one.
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
# ------------
|
||||
# By MWC contributors
|
||||
|
||||
my_name ="Chris"
|
||||
my_name = input ("What is your name ")
|
||||
greeting = "Hello, " + my_name
|
||||
print(greeting)
|
||||
|
||||
Reference in New Issue
Block a user