...
Find a partner - or I will do it for you. I mean it!! THIS IS IMPORTANT. If you don't do it, your score will be penalized. If you don't like to work with a partner, then it is even more important for you to do it.
NOTE: I expect Rivanna will be down during our class. If so, we will use Google Collaboratory instead. It is an environment very similar to Jupyter Notebook. Instead of using the repository (as in the normal directions below) please load the notebook (and make a copy in your Google drive account with the directions below): https://colab.research.google.com/drive/1KanesIrH-zKh316K7siFPCv0UrzWbbax?usp=sharing
You will need to save a copy in your Google Drive by clicking the "File" drop-down menu at the top left of the screen and selecting “save a copy in drive". You should be able to run AND edit the new copy in your Google Drive area.
Note - if we have to use Google Collaboratory, JUST FOR TODAY you can upload your file to your GitHub repository by downloading it to your computer, and then using the GitHub interface to upload the file.
You may need to refer to this week's reading assignment throughout the exercises.
...
Use this link to accept the assignment and create your repository for class06 on GitHub: https://classroom.github.com/a/V-2UFglee80Kacfe
After you accept the assignment and the repository and it exists in your GitHub, as we did in class02, clone the class06 repository into your working area on Rivanna.
...
(or, if we had to use Google Drive, download it to your computer and the upload using the GitHub interface.
...
1b) Based on what you learned in the Notebook. Write a python Python program (a script) called random10.py that prints 10 random x,y (two each time through the loop for a total of 20 random numbers) float values to the screen where each value is between -1 and +1.
Note: You can't do 1b on Google Drive..
NOTE: start by copying triangle.py to random10.py:
>>> cp triangle.py random10.py
→ Design you → Design your algorithm and implement the code in random10.py.
...
NOTE: part 1b is useful in HW04HW03, so make sure you get it done.!
2)More with the math module. (time remaining - probably there won't be!)
Open Google and type "Python math module examples". Look at a few. You can do this with any module that you want to use to understand simple things that can be done. When we know a little more pythonPython, we can better understand the python Python module documentation - for now, looking at examples will do. A major part of learning to program is learning how to read the documentation. We will continue to work on that this semester...If Rivanna is down: use this notebook on Google Drive: https://colab.research.google.com/drive/19zyYHbqso_1Rg1HULbZy_W-SjOCzd_RG?usp=sharing
Now, modify the program: Calculate and print to the screen the length of the long side of the triangle to the screen. Calculate and print the values of the two remaining angles. You will need to use the trig functions that come with the math module. Your program should add the angles and make sure they equal 90 degrees, and print to the screen that it either did , or did not, pass the check.
...
→ Comment, add, commit, and push your triangle.py to GitHub and make sure it is there. (or, if we had to use Google Drive, download to your computer and the upload using the GitHub interface).
Done? Did you document your code? If not, add some documentation to your programs, and re-post them to GitHub: triangle.ipynb, and Random.ipynb.
...