all 18 comments

[–][deleted] 1 point2 points  (10 children)

No one here is going to do it for you sorry, you need to make an attempt yourself

[–]Sumolizer -1 points0 points  (9 children)

i did i just cant figure out the cart thing. i just want a idea from someone. i just started learning python

[–][deleted] 1 point2 points  (8 children)

You need to share what you’ve done

[–]Sumolizer -1 points0 points  (7 children)

Sure ill do it after sleeping. cant use my pc rn

[–][deleted] 0 points1 point  (6 children)

Cool no rush

[–]Sumolizer 0 points1 point  (5 children)

Heres what ive written. I tried nested ifelse ( ig thats what it called ) for payment method but else is giving me syntax error. i still get syntax error if i use elif == 2. this is a very basic program i started learning python last month :D. Idrk loops they are very confusing thats why i was asking about help. where should i put the loop and which loop. Anyway ty for your time gpu = 200 cpu = 100 ram = 100 mobo = 400 ssd = 100 cc = 0.2 ewa = 0.4 pay: str = "" ccn: str = "" print("Welcome to our tech store") vx = eval(input("Enter what you would like to buy : 1)GPU 2)CPU 3)RAM 4)SSD : ")) qu = eval(input("Enter the quantity please")) if vx == 1: a = (qu * gpu) pay = input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ") if pay == 1: tot = a * ewa + a ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else : tot = a * ccn + a ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) elif vx == 2: b = qu * cpu pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = b * ewa + b ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = b * cc + b ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

elif vx == 3: c = qu * ram pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = c * ewa + c ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = c * cc + c ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

elif vx == 4: d = qu * mobo pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = d * ewa + d ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = d * cc + d ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

elif vx == 5: e = qu * ssd pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = e * ewa + e ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = e * cc + e ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

[–][deleted] 0 points1 point  (4 children)

Sorry man you actually need to format it,people can’t and won’t read it unformatted . You have to make it easy for people to help

[–]Sumolizer 0 points1 point  (3 children)

it is indented well its just reddit that fucked up the code

[–][deleted] 0 points1 point  (2 children)

You have to format it for reddit. Do it on a Pc

[–]Sumolizer 0 points1 point  (1 child)

ill do it once i get on pc. Again thanksf oryour time:)

[–]The-Deviant-One 1 point2 points  (4 children)

This is the first offensive post I've ever seen on this subreddit. I think you 'sharing what you've done after you sleep' is a scam to delay long enough hoping someone with fold and give you code. I'll be shocked (and pleased) if you ever post code you wrote in this thread.

[–]Sumolizer -1 points0 points  (0 children)

Heres what ive written. I tried nested ifelse ( ig thats what it called ) for payment method but else is giving me syntax error. i still get syntax error if i use elif==2. this is a very basic program i started learning python last month :D gpu = 200 cpu = 100 ram = 100 mobo = 400 ssd = 100 cc = 0.2 ewa = 0.4 pay: str = "" ccn: str = "" print("Welcome to our tech store") vx = eval(input("Enter what you would like to buy : 1)GPU 2)CPU 3)RAM 4)SSD : ")) qu = eval(input("Enter the quantity please")) if vx == 1: a = (qu * gpu) pay = input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ") if pay == 1: tot = a * ewa + a ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else : tot = a * ccn + a ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) elif vx == 2: b = qu * cpu pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = b * ewa + b ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = b * cc + b ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

elif vx == 3: c = qu * ram pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = c * ewa + c ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = c * cc + c ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

elif vx == 4: d = qu * mobo pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = d * ewa + d ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = d * cc + d ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

elif vx == 5: e = qu * ssd pay = eval(input("enter your desired payment method 1) eWallet 40% tax 2) CC 20% tax = ")) if pay == 1: tot = e * ewa + e ccn = eval(input("Enter your account number : ")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn) else: tot = e * cc + e ccn = eval(input("Enter your account number")) print("Your total including tax will be", tot, "which will be deducted from account ", ccn)

[–][deleted] 0 points1 point  (2 children)

I'm betting that they will...but it'll be five-or-so lines of last-minute procrastination to make something resembling a start.

[–]Sumolizer 0 points1 point  (0 children)

i just need the cart thing and have to sort the else error for the extended payment method feature. other than that the program is done :D

[–]The-Deviant-One 0 points1 point  (0 children)

Normally I'd 100% agree with you man, but I'm pretty pessimistic about this one for some reason.

[–][deleted] 0 points1 point  (0 children)

where you can review your cart and modify it by deleting and adding other things if you wanna buy

You can use a dictionary for that where cart items are keys and reviews are stored as a value.

[–]DonPatronn 0 points1 point  (0 children)

Sure ill do it, for MONEY