forked from CSSE120StartingCode/IntroductionToPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathm2_hello_world.py
More file actions
101 lines (95 loc) · 4.34 KB
/
m2_hello_world.py
File metadata and controls
101 lines (95 loc) · 4.34 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
print('Hello, World')
########################################################################
# This line is a COMMENT -- a note to human readers of this file.
# When a program runs, 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 1 of this
# module (look at it now) prints onto the Console the STRING
# Hello, World
# Anything surrounded by quote marks (single or double) is a STRING.
########################################################################
########################################################################
#
# TODO: 1.
# (Yes, that means for YOU to DO things per these instructions:)
#
# Run this module by right clicking anywhere in this window and select
# Run 'name of file'
# After running, find the Console tab (below) and confirm that
# Hello, World
# did indeed get printed (displayed) on the Console.
#
########################################################################
########################################################################
#
# TODO: 2.
# Notice the small horizontal BLUE bars on the scrollbar-like thing
# on the right. Each blue bar indicates a 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
# to
# DONE.
# Try it now on line 16 above, and note that its blue bar on
# the scrollbar-like thing to the right has gone away.
#
# If you change TODOs to DONEs 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 TO DO #2, so change its TO DO on line 29 to DONE
# (and proceed similarly for all forthcoming TODOs in this course).
#
########################################################################
########################################################################
#
# TODO: 3.
# Add another print statement below.
# It should print any string that you want (but keep it G-rated!)
# Test your code by re-running this module using either the right click
# method again or by using the play button in the upper right.
# Look at the Console to be sure that your string printed as expected.
#
########################################################################
########################################################################
#
# TODO: 4.
# Add yet another print statement.
# 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 TO DO 4?
# (HINT: It is an INTERESTING number.) Get help if your value is wrong.
#
########################################################################
########################################################################
#
# TODO: 5.
# Look at the list of files in this project to the left.
# Note that this file (m2_hello_world.py) is now displayed in a blue
# font color (if the file is highlighted select a different file so yu can
# see the blue font color). That means that you have made changes to
# this file which have not yet been committed.
#
# COMMIT your work by selecting VCS from the menu bar, then select Commit Changes
# Make sure only the files you want to commit are checked and optionally
# add a quick Commit message to describe your work. Then hover over the
# Commit button and select Commit and Push. Commit saves the work to
# your computer. "and Push" saves a copy of your work up into your Github
# repository (saving to the cloud is a better way to permanently safe work).
#
# Oh, one more thing:
# Do you have any blue bars left on the on the scrollbar-like thing
# to the right? If so, click on each blue bar and change
# its TO DO to DONE. Then run the file (to make sure you didn't break
# anything) then Commit and Sync again.
#
# You can COMMIT as often as you like. DO FREQUENT COMMITS.
#
########################################################################