Palindrome Checking

  1. Read the Bill Amount for Customer
  2. 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:



If you have any doubts, feel free to post it in comment Section.


Comments

Popular posts from this blog

Guessing the Number Game

Find the final amount after Discount

Simple Arithmetic Calculator - User Defined Function