Palindrome Checking
- Read the Bill Amount for Customer
- Check if it is greater than 10000 if it is true, Read the Customer Name and check if customer name is Palindrome if it is true, Offer a gift cheque
Code:
Amt=int(input("Enter Bill Amount: Rs."))
if Amt>=10000:
    Name=input("Enter Customer Name: ")
    if Name==Name[::-1]:
        print("You are Eligible for Discount")
        print("Congrats!! You have 10% Discount")
    else:
        print("Sorry!! You are Not Eligible for Discount")
else:
    print("Thank You For Shopping")
Output:

 
 
 
Comments