College: | CUNY School of Professional Studies |
---|---|
Course-Name: | Software Application Programming I |
Course-Code: | IS 210 |
Lesson: | 02 |
The tasks this week will focus on submitting assignments correctly.
Run a script and create the .ipynb file for submission
Important
In these exercises, you may, on occasion, come across a task that requres you to research or use a function or method not directly covered by the course text. Since Python is such a large language it would be impossible for the author to have included descriptions of each and every available function which would largely duplicate the offical Python documentation.
A vital skill to successful programming is being comfortable searching for and using official language documentation sources like the Python String Documentation page. Throughout our coursework we will be practicing both the use of the language in practice and the search skills necessary to become functional programmers.
Run a simple script in your notebook
- Open a new Jupyter notebook
- Paste the code below and ensure it runs appropriately. When running it, you should see a prompt asking for your name followed by a greeting once you hit the enter key.
>>> name = input("What is your name?")
>>> print ("Hi, " + name)
Create a new script and download the script file
- On a new line on your notebook (denoted by the "In [ ]" descriptor), follow the pattern above and create a script that asks for the user location. Then, print a message stating the location back to the user (for example, "wow! i bet is cold in Boston!")
- Click on File -> Download as -> Notebook. Save the file as "yourName_week2.ipynb" (replace "yourName" with your name). Then, go to Blackboard and submit this file by clicking on the assignment title link.