import numpy
def total(a,b):
tot = a*b
print(“the total of these items is:”, tot )
def Paytm():
print(“Select your mode of payment”)
print(“1> cc 2> dc”)
pay = int(input(“Enter your mode of payment: “))
if pay == 1:
card= 123456
cv = 123
cc= int(input(“enter the last 6 digits:”))
if card == cc:
cvv = int(input(“enter your 3 digit cvv number: “))
if cvv == cv:
otp = numpy.random.randint(000000,999999)
print(“your otp is:”,otp)
ottp = int(input(“enter the otp: “))
if otp == ottp:
print(“payment is successfull”)
print(“Your Order will be delivered in 20 min”)
else:
print(“failed transcation!!!”)
else:
print(“enter correct cvv”)
else:
print(“enter correct card number”)
elif pay == 2:
card= 123456
cv = 123
cc= int(input(“enter the last 6 digits:”))
if card == cc:
cvv = int(input(“enter your 3 digit cvv number: “))
if cvv == cv:
otp = numpy.random.randint(000000,999999)
print(“your otp is:”,otp)
ottp = int(input(“enter the otp: “))
if otp == ottp:
print(“payment is successfull”)
print(“Your order will be delivered in 18 min”)
else:
print(“failed transcation!!!”)
else:
print(“enter correct cvv”)
else:
print(“enter correct card number”)
else:
print(“select a correct mode of payment”)
Paytm()
def Googlepay():
print(“Select your mode of payment”)
print(“1> cc 2> dc”)
pay = int(input(“Enter your mode of payment: “))
if pay == 1:
card= 123456
cv = 123
cc= int(input(“enter the last 6 digits:”))
if card == cc:
cvv = int(input(“enter your 3 digit cvv number: “))
if cvv == cv:
otp = numpy.random.randint(000000,999999)
print(“your otp is:”,otp)
ottp = int(input(“enter the otp: “))
if otp == ottp:
print(“payment is successfull”)
print(“Your order will be delivered in 15 min”)
else:
print(“failed transcation!!!”)
else:
print(“enter correct cvv”)
else:
print(“enter correct card number”)
elif pay == 2:
card= 123456
cv = 123
cc= int(input(“enter the last 6 digits:”))
if card == cc:
cvv = int(input(“enter your 3 digit cvv number: “))
if cvv == cv:
otp = numpy.random.randint(000000,999999)
print(“your otp is:”,otp)
ottp = int(input(“enter the otp: “))
if otp == ottp:
print(“payment is successfull”)
print(“Your order will in 17 min”)
else:
print(“failed transcation!!!”)
else:
print(“enter correct cvv”)
else:
print(“enter correct card number”)
else:
print(“select a correct mode of payment”)
Googlepay()
def phonepe():
print(“Select your mode of payment”)
print(“1> cc 2> dc”)
pay = int(input(“Enter your mode of payment: “))
if pay == 1:
card= 123456
cv = 123
cc= int(input(“enter the last 6 digits:”))
if card == cc:
cvv = int(input(“enter your 3 digit cvv number: “))
if cvv == cv:
otp = numpy.random.randint(000000,999999)
print(“your otp is:”,otp)
ottp = int(input(“enter the otp: “))
if otp == ottp:
print(“payment is successfull”)
print(“Your order will be delivered in 19 min”)
else:
print(“failed transcation!!!”)
else:
print(“enter correct cvv”)
else:
print(“enter correct card number”)
elif pay == 2:
card= 123456
cv = 123
cc= int(input(“enter the last 6 digits:”))
if card == cc:
cvv = int(input(“enter your 3 digit cvv number: “))
if cvv == cv:
otp = numpy.random.randint(000000,999999)
print(“your otp is:”,otp)
ottp = int(input(“enter the otp: “))
if otp == ottp:
print(“payment is successfull”)
print(“Your order will be delivered in 26 min”)
else:
print(“failed transcation!!!”)
else:
print(“enter correct cvv”)
else:
print(“enter correct card number”)
else:
print(“select a correct mode of payment”)
phonepe()
def Cod():
add = input(“Enter your address: “)
print(“do you want to continue with cash on delivery(y/n):”)
choi = input(“enter your choice: “)
if choi== “y”:
print(“Your order will be delivered in 25 min”)
else:
payment()
def payment():
print(“Select the mode of payment”)
print(“1> Paytm 2> GooglePay 3> PhonePe 4> Cash on Delivery”)
paym = int(input(“select the mode of payment: “))
if paym == 1:
Paytm()
elif paym==2:
Googlepay()
elif paym ==3:
phonepe()
else:
Cod()
def menu():
print(“sr.no. item price”)
print(“1> Apple 45”)
print(“2> orange 70”)
print(“3> kiwi 130”)
print(“4> banana 7”)
item = int(input(“Enter the item no: “))
quantity = int(input(“Enter the quantity required: “))
if item == 1:
item = 45
elif item == 2:
item = 70
elif item == 3:
item = 130
elif item == 4:
item = 7
else:
print(“NO ITEM PRESENT AT THIS INDEX”)
total(item,quantity)
more = input(“Do you want to add more items in the cart: y/n:”)
if more == “y”:
menu()
else:
payment()
menu()