Menu
support@authoritypapers.com
+1(805) 568 7317

python3 question 5 this question has 2 parts 1 5 points write a function named forma 5154101

python3


Question 5. This question has 2 parts: 1. (5 points) Write a function named format_date The function has 3 integer arguments:
Question 6. (10 points) Consider the following Farmer Problem: Farmer John had ducks and cows. One day he noticed that the a Question 5. This question has 2 parts: 1. (5 points) Write a function named format_date The function has 3 integer arguments: date, month, and year The function returns a date string in the format of DD/MM/YYYY For example, if the argument date is 1, month is 2, year is 2000, then the function returns the string 01/02/2000; if the argument date is 10, month is 11, year is 2018, then the function returns the string 10/11/2018. 2. (5 points) Write a main program, that asks the user to enter a date, a month and a year, and then uses the above function to display the entered date in the format DD/MM/YYYY. The program should work as in the following example: Enter date: 3 Enter month: 10 Enter year: 2000 You have entered: 03/10/2000 Question 6. (10 points) Consider the following Farmer Problem: “Farmer John had ducks and cows. One day he noticed that the animals had a total of 10 heads and 28 legs. How many of the animals were ducks and how many were cows?” The solution is 6 ducks and 4 cows. Write a program to solve the Farmer Problem. The program asks the user to enter the number of animal heads and the number of legs. Then the program uses the FOR LOOP to search for a solution. If there is a solution, then the program displays the solution, otherwise, the program should display that there is no solution. a message saying The program should work as in the following example: Enter head count: 10 Enter leg count: 24 Solution found. duck: 8, cow: 2 Here is another example: Enter head count: 10 Enter leg count: 23 No solution found.

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now