Goals:
- We are going to learn some basic programming and thinking about computers. Today’s files are in https://github.com/bmaillou/BigDataPython/tree/master/02-Directories.
- First we will practice changing directories and thinking about where we work.
- Reminder. If you want to download it from github right click on raw and choose save link as. If you get a .txt file ending change it it .ipynb and you can now open it in your jupyter notebook.
- Second we will do Markdown, basic math, and printing
VIDEO FOR TODAY
QUIZ for after Video
- Remember that you need to take the quiz before class on courseworks! It is labeled quiz 1 and called
Quiz 1: Python Video on Directories and Printing
Notebook 1 Due beginning of Next class. (Wednesday January 29, 2025)
- Code.org intro course through stage 5 to stay on track.
- Look at the directory structure of your computer and make a place to work from when using Python (not graded, for your own organization)
- In the Jupyter Notebook for your homework use Markdown to make a nice header with your name, date, assignment and other information that is relevant. This is required of all homework. The reason we use the notebooks is because you can add markdown to make programming understandable and reproducible. Start practicing that from the first homework. This is critical. You must add your name, date, section, and assignment in markdown.
- Use one print statement to make a capital letter of your first name. My B out of b’s is below. In your print statement you can use your letter, \t, \n and minimal spaces. My example is below but you can make yours look nicer with your letter! You need to use one print statement only!.
- Use print statements and .format to answer the math questions below exactly the same way with the exact formatting. You need to set an and b and use them in your format statement. Your print statement cannot have numbers. Repeat-There are no numbers in your print/format statement. You set the an and b before the print statement.
- Upload your homework to courseworks. You upload the notebook. The file you upload should end in .ipynb. DO NOT upload a pdf and do not upload screen shots. There is no need to export anything. Just go find your .ipynb notebook and upload that to courseworks.
- Watch Next Video and Take Quiz
Brian B (Really looks more like an 8)
Your answer should nicer than
BBBBB
B B
B B
BBBBB
B B
B B
BBBBB
Set
a=9.000
set b=4.000
Write the following sentence exactly. using the .format nomenclature and no numbers only variables. Use the a and b that you set in the format and print function. Use the different operators with your variables. Look at today’s handout for examples with the print and format functions. The * should be in with the formatting calls.
When 9 is divided by 4.00 the answer is **2*** with a remainder of 1.0
Then to check you did it correctly. I will open your notebook. I will change your a=55.000 to a=4.000 and it should give me this sentence
“When 55 is divided by 4.00 the answer is **13** with a remainder of 3.0”