Programming Essentials – MUST KNOW HOW TO DO PYTHON CODES

 

Week 1 Assignment

Write a program that does the following in order:

1.  Asks the user to enter a name

2.  Asks the user to enter a number “x”

3.  Asks the user to enter a number “y”

4.  Calculates the sum of “x” and “y”

5.  Prints out the number for “x”, “y” and “sum”

An example of the program input and output is shown below:

Enter your name: Belinda Patton

Enter number x: 50

Enter number y: 10

The sum of 50 and 10 is 60