Please help Jammin carry out school.

Asked 2 years ago, Updated 2 years ago, 59 views

I want to make the price different for each number like in the picture I keep getting errors, so I don't know what to do.

idle

2022-09-20 08:47

1 Answers

You called yourself "Jammin," but you seem to be a person who can do something for himself. Then let's talk about Jammin without his rank.

1. First, let's move the simple message from the discount to the top. If you look at the local supermarket flyers, they all look like that, right?

It seems useless, but it's better for programmers to pay attention to these details. Currently, the code prints that it is subject to a 10% discount only after you receive what drink to choose, but the discount actually applies to all drinks, right? If so, it is better to inform the user of such information in advance before choosing a drink to reduce their cognitive errors. That's actually the principle that local super flyers place "discount all items" in the best view.

2. The code in the form of a=blah blah (or a[something]= that time ) is so too much~There are a lot of radishes.
You'll only have to do this once.

a=[3500, 5000, 7000]

3. Fix it with kkxxtg=int(input('to purchase~~') and calculate multi(a[kkxxtg]) and let the customer know.
Since you said a=[3500, 5000, 7000] above, if you enter 0, you can let the customer know the 10% discount of 3,500 won, right?

I thought you could do it on your own, so I just gave you a hint. Now, try it.

PS. What grade are you in now and why is this coming up as a task? I'm very sorry about this.


2022-09-20 08:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.