pimento[~]$ fixscreenmirror pimento[~]$ clear pimento[~]$ update21 No new updates found. Last two updates shown below 2 days ago Wed Sep 5 09:04:35 2018 -0400 inclass/w01/graduate.py inclass/w01/welcome.py 7 days ago Fri Aug 31 16:27:28 2018 -0400 labs/00/QUESTIONS-00.txt labs/01/QUESTIONS-01.txt labs/01/menu.py labs/01/ops.py labs/01/pizza.py pimento[~]$ pimento[~]$ cd cs21/inclass/w01/ pimento[w01]$ ls graduate.py transcript2.txt welcome.py pimento[w01]$ cd .. pimento[inclass]$ cd pimento[~]$ ls Desktop/ Documents/ cs21/ f17cs21/ pimento[~]$ cd cs21/inclass/w01/ pimento[w01]$ python3 Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> >>> x = 5 >>> y = 3.14 >>> x = x + y >>> print(x) 8.14 >>> int(x) 8 >>> print(x) 8.14 >>> float(8) 8.0 >>> float("2.25") 2.25 >>> x = "2.25" >>> type(x) >>> z = float(x) >>> type(z) >>> y = input("Enter the year: ") Enter the year: 2018 >>> y '2018' >>> year = int(y) >>> year 2018 >>> year_str = input("Enter the year: ") Enter the year: 2018 >>> year = int(year_str) >>> year 2018 >>> year_str = input("Enter the year: ") Enter the year: hello >>> year = int(year_str) Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 10: 'hello' >>> year int(year_str) File "", line 1 year int(year_str) ^ SyntaxError: invalid syntax >>> year = int(year_str ... ... ... ) Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 10: 'hello' >>> exit() pimento[w01]$ atom welcome.py pimento[w01]$ python3 welcome.py Enter your name: Sara Hello Sara ! pimento[w01]$ python3 welcome.py Traceback (most recent call last): File "welcome.py", line 7, in main() NameError: name 'main' is not defined pimento[w01]$ python3 ~/Documents/graduate_sol.py Enter your graduation year: 2019 Enter the current year: 2018 You have 1 years left until graduation! pimento[w01]$ python3 ~/Documents/graduate_sol.py Enter your graduation year: 2022 Enter the current year: 2018 You have 4 years left until graduation! pimento[w01]$ atom graduate.py pimento[w01]$