-
Notifications
You must be signed in to change notification settings - Fork 0
/
w5lab2.html
21 lines (19 loc) · 1.13 KB
/
w5lab2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>w5lab2</title>
</head>
<body>
<ol>
<li>What is a function? How do we creat one?</li>
<p> It is a tool that apply to our codes in programming. With def function, we can set a new function in program. We can type in more functions under def for further changes in programming.</p>
<li>Why are functions so useful?</li>
<p>Because we can apply new funtions thatis not in system for programming of our own program. If we want to change the color for picture, we simply can just type in new function into program.</p>
<li>In your wards, describe what a loop is.</li>
<p>Loop is a layer of functions in one program. It allows us to make more than one change for our program in multiple step.</p>
<li>How do loops help us in programming? Give us an example of when you would use a loop</li>
<p> Loop allows us to creat more than one function that needs to be applied into our program in multiple step. To change our picture in pixels, we can apply new functions under one function into a picture. loop allows us to apply to pixel change and color change etc.</p>
</ol>
</body>
</html>