-
Notifications
You must be signed in to change notification settings - Fork 805
/
010_comments.py
91 lines (82 loc) · 3.18 KB
/
010_comments.py
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Before you go any further:
# Replit has added some AI tools! Pretty cool, but it might
# interfere with your learning if the AI does your work for
# you. To disable it, find the 'AI' button at the bottom of
# the screen, click it, and then uncheck the check box next
# to 'Enable'.
# Here's a video that will show you how: https://vimeo.com/956351893/f5a80a1c1b
# You're welcome to re-enable it if you want to try it out,
# but keep it disabled when you're doing the exercises.
# Now, back to where we were —
# Video alternative: https://vimeo.com/954334215/cbd70ba2fa
# Hello! Welcome to programming. My name is Kay and I will
# guide you through these early steps.
#
# To begin, I'd like to share with you a little quote from a
# writer called Italo Calvino, himself retelling a Chinese
# story:
#
# "Among Chuang-tzu's many skills, he was an expert
# draftsman. The king asked him to draw a crab. Chuang-tzu
# replied that he needed five years, a country house, and
# twelve servants. Five years later the drawing was still
# not begun. "I need another five years," said Chuang-tzu.
# The king granted them. At the end of these ten years,
# Chuang-tzu took up his brush and, in an instant, with a
# single stroke, he drew a crab, the most perfect crab ever
# seen."
#
# Perhaps you have come to programming because you would
# like to be good at it. Perhaps you know people, or you
# have heard of people, who are really exceptional
# programmers.
#
# You, very likely, are not this person yet. Like
# Chuang-tzu, it will take you many years to reach the
# effortless skill of an expert programmer.
#
# But every programmer has sat where you are sat, curious
# and willing to learn. They have spent many hours getting
# things wrong, being stuck, being confused. You will go
# through this too.
#
# Every expert sat where you are sat. What they all have in
# common? They kept going.
#
# So let's get started.
#
# What are we learning?
# =====================
#
# We're going to learn the fundamentals of the programming
# language Python. Most programming languages are quite
# similar, so it doesn't matter much that this is Python.
# The key ideas are the same.
#
# We're going to learn enough to succeed in the Makers
# interview process. The ideas themselves are quite simple.
# The complexity of programming is in the combination of
# these ideas. Here's a list of what we'll learn:
#
# * Functions (making your own programs)
# * Arithmetic (basic maths)
# * Expressions and statements (the building blocks of
# programs)
# * Strings (letters and words)
# * Conditionals (ifs and elses)
# * Lists (sequences of items)
# * Loops (whiles and fors)
# * Dictionaries (pairs of items)
#
# You will find exercises throughout the material,
# signposted with @TASK. We will finish the material with
# some extra tricky exercises for you to test your skills.
#
# By the way — these lines starting with the `#` character?
# They're called comments. They don't get run by Python —
# they're just for me to talk to you. You can create one
# yourself if you like.
# Type your name as a comment on the next line.
# Hint: if you're on a Mac, type opt + 3 to get a #
# Now open up 011_identity.py and get started with some
# real code!