forked from csse120-201920/01-IntroductionToPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathm2_todo_and_commit_push.py
More file actions
130 lines (125 loc) · 5.35 KB
/
Copy pathm2_todo_and_commit_push.py
File metadata and controls
130 lines (125 loc) · 5.35 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
###############################################################################
#
# This line is a COMMENT -- a note to human readers of this file.
# When the Python interpreter RUNS (i.e. EXECUTES) a program, it ignores
# everything from a # (hash) mark to the end of the line with the # mark.
#
# We call files that have Python code in them MODULES.
# Line 15 of this module (look at it now) prints (displays) the STRING
# Hello, World
# on the Run window.
#
# Anything surrounded by quote marks (single or double) is a STRING.
#
###############################################################################
print('Hello, World')
###############################################################################
#
# done: 1.
# (Yes, that means for YOU to DO things per these instructions:)
#
# Run this module by right clicking anywhere in this window
# and selecting
# Run 'name of file'
# Or, use the keyboard shortcut: Control + Shift + Function-F10.
#
# After running, find the Run window and confirm that
# Hello, World
# did indeed get printed (displayed) on that window.
#
###############################################################################
###############################################################################
#
# TODO: 2.
# Notice the small horizontal BLUE bars on the scrollbar-like thing
# on the right. Each blue bar indicates a thing TO-DO in this module.
#
# a. You can use the blue bars to go from one TO-DO to the next
# by clicking on the blue bars. ** Try that now. **
#
# b. When you have completed a TO-DO, you should change the word
# _TODO_ (ignore the underscores on this line)
# to
# DONE
# Try it now on line 19 above, and note that its blue bar on the
# scrollbar-like thing to the right goes away soon thereafter.
#
# If you change each _TODO_ to DONE like this, you can tell when you
# have finished all the exercises in a module -- there will be no
# blue bars left on the scrollbar-like thing to the right.
#
# You have now completed _TODO_ #2, so change its _TODO_ on line 35 to DONE
# (and likewise for all forthcoming TODOs in this course).
#
###############################################################################
###############################################################################
#
# TODO: 3.
# Add another print statement below this comment.
# It should print any string that you want (but keep it polite and G-rated!)
#
# Test your code by re-running this module, either by proceeding
# as you did when you ran this module the first time,
# or by pressing the green rightward-pointing triangle
# that is the "Play" button on the toolbar at the top of this window.
# Look at the Run window to be sure that your string printed as expected.
#
###############################################################################
###############################################################################
#
# TODO: 4.
# Add yet another print statement, putting it below this comment.
# This one should print the *product* of 3,607 and 34,227.
# Let the computer do the arithmetic for you (no calculators!).
# You do NOT have to use strings for this, so no quotation marks!
#
# TEST your code by re-running this module, then asking someone
# whom you trust:
# What number did your print display for this TO-DO?
# (HINT: It is an INTERESTING number.) Get help if your value is wrong.
#
###############################################################################
###############################################################################
#
# TODO: 5.
# Look at the list of files in the Project window (to the left).
# Note that this file:
# m2_todo_and_commit_push.py
# is now displayed in BLUE.
#
# The BLUE font color means that you have made changes to this file which
# have not yet been COMMITTED to version control and PUSHED to the cloud.
#
# COMMIT and PUSH your work by:
# 1. Select VCS from the menu bar (above).
# 2. Choose Commit from the pull-down menu that appears.
# 3. In the Commit Changes window that pops up,
# press the Commit and Push button.
# (Note: If you see only a Commit button:
# - HOVER over the Commit button
# (in the lower-right corner of the window)
# - CLICK on Commit and Push.)
#
# COMMIT adds the changed work to the version control system
# on your COMPUTER. PUSH adds the changed work into your Github
# repository in the "cloud".
#
# PyCharm forces you to add a Commit message intended to describe
# your work to teammates, but until your team project use Done
# or whatever you want for the Commit message.
#
# Always PUSH (in addition to the COMMIT) so that your work
# is backed-up in the cloud. If you COMMIT but forget to PUSH,
# you can subsequently do the PUSH by:
# VCS ~ Git ~ Push...
#
# Oh, one more thing:
# Do you have any blue bars on the scrollbar-like thing to the
# right? If so, click on each blue bar and change its _TODO_ to
# DONE and then run the module (to make sure you didn't break
# anything) and COMMIT-and-PUSH again.
#
# You can COMMIT-and-PUSH as often as you like.
# DO IT FREQUENTLY; AT LEAST once per module.
#
###############################################################################