Question: Problem Description: Write a program called a02.py to have a conversation with the user. Your program should do the following: Ask the user for their
Problem Description:
Write a program called a02.py to have a conversation with the user. Your program should do the following:
-
Ask the user for their name. Store this in a variable called name.
-
Ask the user for a subject they are studying. Store this in a variable called subject.
-
Now, tell the user the following:
Hello (name here)!!! Welcome to my first Python program. You will do very well in (subject here) if you work hard!
-
Next, read 2 numbers from the user and output their sum, difference, product and quotient and remainder.
-
Finally, output a message: Thank you for using my program and end.
-
Please see examples of my output from this program below.
Inputs
It should take name, and subject for the first part. Then it should read 2 integers for the second part.
Output
It should output a message using the name and subject for the first part. For the second part, it should output the sum, difference, product, quotient and the remainder of the division operation.
Example of Output
>>>
========== RESTART: /Users/gd.iyer/Documents/PCC/CS 160/a01.py ============
Please enter your name:GD Iyer
Please enter your subject:Computer Science
Hello GD Iyer !!! Welcome to my first Python program.
You will do well in Computer Science if you work hard.
Enter a number:4
Enter another number:3
The sum of 4 and 3 = 7
The difference of 4 and 3 = 1
The product of 4 and 3 = 12
The quotient of 4 and 3 = 1.3333333333333333
The remainder of 4 and 3 = 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
