-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_guide.txt
67 lines (47 loc) · 1.96 KB
/
project_guide.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Welcome to the Week 1 Project Guide!
This project will show you a few different things:
1. How are characters and numbers related?
2. What is ASCII art?
3. What are:
a. Variables?
b. If-statements?
c. Functions?
d. Function calls?
e. Parameters?
f. Looping
4. What is a Python "module"?
5. How can we use modules to show things in the console (the terminal)?
_____________________________
Getting started:
This project is an intro project, so ANova has designed most of the project for you already!
However, there are still some parts that do not work :( Your job is to fill them out (and look cool while doing it B-) )!
_____________________________
Instructions
Scroll to the pickColor() function.
1. Replace the parts that say "YOUR COLOR HERE" with colors from the color palette described in the comments.
a. Keep the quotation marks when you replace the color!
2. Change the numbers in the if-statements. What changes?
3. Add a 5th color using a new if-statement.
a. How many if-statements do you need to use all the possible colors?
b. Add 2 more colors.
4. Figure out the answers to the commented questions. Ask a mentor if you need help with any of them!
Next, make a new file
Call it my_art.txt
Create an ASCII art pattern!
Lastly, Go back to the Python file
At the top of the file you should see the input_file variable being set to open("sampleArt.txt", "r")
Change the filename to be the name of the ASCII art file that you just created
Run the function! What do you get?
_____________________________
Questions (answer these here)
What is a function? Give an example.
What is a parameter? Give an example.
What is a variable? Give an example.
Which line has the for-loop? What does this line do?
How do if-statements work?
Which module or modules did we use in this project?
Challenge:
How does Python read your ASCII art file?
How does it decide which color to put?
(Hint: look at the bottom of the Python file.)
_____________________________