Difference between revisions of "CSC111 Lab 1 2018"
(Created page with "~~~~ ---- 100px|right __TOC__ <center> <br /> =Lab 1: HAVING FUN WITH PYTHON= <br /> </center> <br /> <bluebox> This lab is an introduction to Python...") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 14:56, 16 January 2018 (EST) | [[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 14:56, 16 January 2018 (EST) | ||
---- | ---- | ||
− | + | <onlydft> | |
[[Image:PythonLogo.jpg|100px|right]] | [[Image:PythonLogo.jpg|100px|right]] | ||
__TOC__ | __TOC__ | ||
Line 47: | Line 47: | ||
=Option 1: Installing and Running Python on your Laptop= | =Option 1: Installing and Running Python on your Laptop= | ||
<br /> | <br /> | ||
− | * If you want to work on your own laptop, you need to install Python 3. Open this [http://cs.smith.edu/dftwiki/index.php?title= | + | * If you want to work on your own laptop, you need to install Python 3. Open this [http://cs.smith.edu/dftwiki/index.php?title=CSC111_Preparation_for_Lab_1_2018 page] and follow the instructions for downloading Python 3 to your laptop. |
<br /> | <br /> | ||
Line 106: | Line 106: | ||
<source lang="python"> | <source lang="python"> | ||
age = 20 | age = 20 | ||
− | year = | + | year = 2018 |
print( age ) | print( age ) | ||
Line 129: | Line 129: | ||
age = 20 | age = 20 | ||
− | year = | + | year = 2018 |
print( age, year ) | print( age, year ) | ||
Line 145: | Line 145: | ||
age = 20 | age = 20 | ||
− | year = | + | year = 2018 |
yearBorn = year - age | yearBorn = year - age | ||
Line 163: | Line 163: | ||
college = "Smith College" | college = "Smith College" | ||
age = 20 | age = 20 | ||
− | year = | + | year = 2018 |
print( name, "goes to", college ) | print( name, "goes to", college ) | ||
Line 169: | Line 169: | ||
</source> | </source> | ||
<br /> | <br /> | ||
− | * Run your program a few times, each time changing the value of a variable. For example change "Alex" to "Monique", or year to | + | * Run your program a few times, each time changing the value of a variable. For example change "Alex" to "Monique", or year to 2018. |
Line 187: | Line 187: | ||
college = "Smith College" | college = "Smith College" | ||
age = 20 | age = 20 | ||
− | year = | + | year = 2018 |
</source> | </source> | ||
Line 194: | Line 194: | ||
Alex goes to Smith College and is 20 years old | Alex goes to Smith College and is 20 years old | ||
− | Alex was born in | + | Alex was born in 1998 |
Line 200: | Line 200: | ||
Francis goes to Umass and is 18 years old | Francis goes to Umass and is 18 years old | ||
− | Francis was born in | + | Francis was born in 2000 |
* Verify that your program works correctly | * Verify that your program works correctly | ||
Line 297: | Line 297: | ||
|} | |} | ||
[[Image:QuestionMark5.jpg|right|100px]] | [[Image:QuestionMark5.jpg|right|100px]] | ||
− | * Add three new names to the list and make your program output them all one above the other. | + | * Add three new names to the list and make your program output them all, one above the other. |
Line 418: | Line 418: | ||
====Step 1==== | ====Step 1==== | ||
<br /> | <br /> | ||
− | * Create a program called '''lab1COD.py''' with all the statements below. | + | * Create a program called '''lab1COD.py''' with all the statements below (COD stands for Challenge-Of-the-Day). They contain the solution for this challenge. You will need to figure out how to rearrange them and modify them to create the answer for this challenge. So create this program and study carefully its code and its output. |
<br /> | <br /> | ||
<source lang="python"> | <source lang="python"> | ||
Line 498: | Line 498: | ||
<br /> | <br /> | ||
* For this lab you need to submit your solution program on Moodle. This submission is graded and the grade counts toward your lab grade for this class (15% of the total grade). | * For this lab you need to submit your solution program on Moodle. This submission is graded and the grade counts toward your lab grade for this class (15% of the total grade). | ||
− | * Go to this [http://cs.smith.edu/dftwiki/index.php/ | + | * Go to this [http://cs.smith.edu/dftwiki/index.php/CSC111_Submitting_Programs_to_Moodle_2018b page] and follow the directions for submitting your program. Remember that your program must be called '''lab1COD.py''' for you to submit it. Both partners in the Pair Programming team should submit under the program under their own name. |
<br /> | <br /> | ||
<tanbox> | <tanbox> | ||
If you see a pop-up window appear when you try to evaluate you program, mentioning "encrypted connection," then follow the steps listed in [[Moodle_and_Certificates| this page]] to get rid of this annoyance. | If you see a pop-up window appear when you try to evaluate you program, mentioning "encrypted connection," then follow the steps listed in [[Moodle_and_Certificates| this page]] to get rid of this annoyance. | ||
</tanbox> | </tanbox> | ||
− | * '''Deadline''': | + | * '''Deadline''': the deadline is set to 2/8/18, to allow Add/Drop students to catch up. |
* '''Grade''': | * '''Grade''': | ||
** Program submitted (even if it doesn't work correctly or has errors): 100, or '''A''' | ** Program submitted (even if it doesn't work correctly or has errors): 100, or '''A''' | ||
Line 539: | Line 539: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
− | <showafterdate after=" | + | <showafterdate after="20180203 00:00" before="20180601 00:00"> |
<br /> | <br /> | ||
=Solution Programs= | =Solution Programs= | ||
Line 553: | Line 553: | ||
college = "Smith College" | college = "Smith College" | ||
age = 20 | age = 20 | ||
− | year = | + | year = 2018 |
print( name, "goes to", college, "and is", age, "years old" ) | print( name, "goes to", college, "and is", age, "years old" ) | ||
Line 629: | Line 629: | ||
</showafterdate> | </showafterdate> | ||
<br /> | <br /> | ||
+ | </onlydft> | ||
<onlydft> | <onlydft> | ||
=VPL Module= | =VPL Module= | ||
Line 664: | Line 665: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
− | + | ||
<br /> | <br /> | ||
<br /> | <br /> |