Final Prat Luce Quiz nklin Blay: Attempt 1 White a program that prompts the user
ID: 3825000 • Letter: F
Question
Final Prat Luce Quiz nklin Blay: Attempt 1 White a program that prompts the user for a month and a day. Assume that months are specified as an integer between 1 and 12 for January, 2 for February, and so on) and that the day of the month is a number between 1 and 31. lf the date falls between 12/16 and 315, you should print the date falls between 3/16 and 6/15, you should print "Spring. If the falls between and 915, you should print Summer And if the date falls between 916 12 you should print "FallExplanation / Answer
1)Area of triangle python code :
import math
def Area_of_Triangle(a, b, c):
s = (a + b + c) / 2
Area = math.sqrt((s*(s-a)*(s-b)*(s-c)))
print(" The Area of a Triangle is %0.2f" %Area)
Area_of_Triangle(6, 7, 8)
output : The Area of a Triangle is 15.49
2)Type of triangle python code:
def Type_of_Triangle(x, y, z):
if x == y == z:
print("Equilateral triangle")
elif x != y != z:
print("Scalene triangle")
else:
print("isosceles triangle")
Type_of_Triangle(6, 7, 8)
output : Scalene triangle
3)palindrome
num=int(raw_input("Enter a number"))
sum1=0
n=num
while num!=0:
rem=num%10
sum1=sum1*10+rem
num=num/10
if sum1==n:
print n, "is palindrome"
else:
print n, "is not palindrome"
output :
Enter a number121
121 is palindrome
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.