Assignment Chapter 1
Instructions:
- Use as many code cells as you need to implement the tasks below.
- Submit a Jupyter Notebook (iPython) doc
(1) Assigning Values to Variables
- Assign a number to the x variable
- Increment the number
- Perform any additional operations (subtractions, multiplications, division, etc).
In [ ]:
(2) Finding a Solution Using the Pythagorean Theorem in Python
- Create three variables, x, y, & z, and assign them to the values 2,3, & 4
- Find the sum of each value squared individually (x^2 + y^2 + z^2).
- Print the square root of that value, which is the Pythagorean Distance in 3 Dimensions
In [ ]:
(3) The input() Function
- Create a user input interface that prompts the user for their name. Save the input value to a variable.
- Greet the user by saying “Hello, NAME” where name is the user’s name.
- Ask the user to rate their day, give them a prompt for a number between 1 & 10, 10 being the best day, 1 being the worst day.
- Tell the user “Enjoy your RATE day, NAME” where RATE is the number they entered and NAME is their name.