Question: Write a program in Python that passes two set values (4 and 7) to a function to find the sum, then to another argument that

Write a program in Python that passes two set values (4 and 7) to a function to find the sum, then to another argument that prints the new value out. Your program should meet the following expectations:

  • Have three functions
    • main()
    • addNumbers()
    • userPrint()
  • Main should have two variables set
    • Variable 1 should be 4
    • Variable 2 should be 7
  • The variables should be passed from main to addNumbers
  • In the addNumbers function, find the sum of the numbers and return the value to main
  • The new value in main should be passed from main() to userPrint()
  • The new, summed value should be printed out with a user friendly message from the userPrint() function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!