python questions
python questions
Write a function that takes an integer between 1 and 7 and prints the
corresponding day of the week. The mapping is as follows:
1: "Monday"
2: "Tuesday"
3: "Wednesday"
4: "Thursday"
5: "Friday"
6: "Saturday"
7: "Sunday"
2. Write a Python function that takes three integers representing the lengths
of the sides of a triangle and classifies the triangle as:
If the input sides do not form a valid triangle, print "Invalid Triangle".
3. Write a Python function that checks if a given year is a leap year. The year
is a leap year if:
It is divisible by 4, and
Print "Leap Year" if the year is a leap year, otherwise print "Not a Leap Year".
4. Write a Python function that takes an integer n and classifies the number
based on the following conditions: