Question: PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU QUESTION:10 Task 2.1 Factorial [5 Points] Background: The factorial of a positive integer n is

PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU

PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU QUESTION:10 Task

QUESTION:10 Task 2.1 Factorial [5 Points] Background: The factorial of a positive integer n is the product of all positive integers less than or equal to n. It is denoted as ni. N! = n* (n-1) * (n-2)* (n-3). 3+2+1 Programming task Write a Python program that asks the user for the number and displays the factorial of a user input number. See examples below. How do you deal with a negative number? Example Runs : Enter a number: 6 Factorial of 6 is 720 User input Enter a number: 7 Factorial of 7 is 5040 User input W User input Enter a number:-9 Sorry, factorial for negative number does not exists Task 2.2 A Leap Year [7 Points] Background: A leap year is a year which is exactly divisible by 4 (i.e. remainder is zero) except for the years that are exactly divisible by 100 are also exactly divisible by 400. For instance, 1700, 1800, 1900 are not leap years but 1600, 2000, 2008, 2024, 2032 are leap years. Programming task. Write a Python program to determine whether the provided user input is a Leap year. Example Runs : Enter a year: 1700 1700 is not a leap year. User input Enter a year: 1600 1600 is a leap year. User input w Enter a year: 2008 2008 is a leap year User input Hint: Use if else statements inside the if and else blocks

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!