56 lines
2.5 KiB
Plaintext
56 lines
2.5 KiB
Plaintext
{\rtf1\ansi\ansicpg1252\cocoartf2580
|
|
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
|
{\colortbl;\red255\green255\blue255;}
|
|
{\*\expandedcolortbl;;}
|
|
\margl1440\margr1440\vieww11520\viewh8400\viewkind0
|
|
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
|
|
|
\f0\fs24 \cf0 scott@MacBook-Pro-6 Scott_Submissions % python3 HW7.py\
|
|
Enter 2 to run Q2 class for same result, 3 to run Q3 class for different result: 1\
|
|
Please only choose between 2 and 3\
|
|
scott@MacBook-Pro-6 Scott_Submissions % python3 HW7.py\
|
|
Enter 2 to run Q2 class for same result, 3 to run Q3 class for different result: 2\
|
|
Here is the sample task for Question 2:\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(27)calculation2()\
|
|
-> print(f"The sum is: \{result\}")\
|
|
(Pdb) step\
|
|
The sum is: 13\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(28)calculation2()\
|
|
-> print(f"The product is: \{product\}")\
|
|
(Pdb) c\
|
|
The product is: 42\
|
|
scott@MacBook-Pro-6 Scott_Submissions % python3 HW7.py\
|
|
Enter 2 to run Q2 class for same result, 3 to run Q3 class for different result: 2\
|
|
Here is the sample task for Question 2:\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(27)calculation2()\
|
|
-> print(f"The sum is: \{result\}")\
|
|
(Pdb) next\
|
|
The sum is: 13\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(28)calculation2()\
|
|
-> print(f"The product is: \{product\}")\
|
|
(Pdb) c\
|
|
The product is: 42\
|
|
scott@MacBook-Pro-6 Scott_Submissions % python3 HW7.py\
|
|
Enter 2 to run Q2 class for same result, 3 to run Q3 class for different result: 3\
|
|
Here is the sample task for Question 3:\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(50)calculation3()\
|
|
-> product = self.multiply(a, b)\
|
|
(Pdb) step\
|
|
--Call--\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(42)multiply()\
|
|
-> def multiply(self, a, b):\
|
|
(Pdb) c\
|
|
The sum is: 13\
|
|
The product is: 42\
|
|
scott@MacBook-Pro-6 Scott_Submissions % python3 HW7.py\
|
|
Enter 2 to run Q2 class for same result, 3 to run Q3 class for different result: 3\
|
|
Here is the sample task for Question 3:\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(50)calculation3()\
|
|
-> product = self.multiply(a, b)\
|
|
(Pdb) next\
|
|
> /Users/scott/Desktop/GTSP/python-bootcamp/Scott_Submissions/HW7.py(52)calculation3()\
|
|
-> print(f"The sum is: \{result\}")\
|
|
(Pdb) c\
|
|
The sum is: 13\
|
|
The product is: 42\
|
|
scott@MacBook-Pro-6 Scott_Submissions % } |