1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
julsineya [31]
3 years ago
11

Please write in python:

Computers and Technology
1 answer:
Alenkasestr [34]3 years ago
6 0

Week 1:

print("1. Skittles    2. M&M's\n3. Starbursts   4. Twizzlers\n5. Twix")

while True:

   item = input("Enter the number of your item to be purchased: ")

   if item == "1":

       print("You chose skittles.")

   elif item == "2":

       print("You chose M&M's.")

   elif item == "3":

       print("You chose Starbursts.")

   elif item == "4":

       print("You chose Twizzlers.")

   elif item == "5":

       print("You chose Twix.")

Week 2:

print("1. Skittles    2. M&M's\n3. Starbursts   4. Twizzlers\n5. Twix")

total = 0

while True:

   item = input("Enter the number of your item to be purchased: ")

   if item == "1":

       print("You chose skittles.")

       total += 2

   elif item == "2":

       print("You chose M&M's.")

       total += 2

   elif item == "3":

       print("You chose Starbursts.")

       total += 1

   elif item == "4":

       print("You chose Twizzlers.")

       total += 3

   elif item == "5":

       print("You chose Twix.")

       total += 4

   elif item == "exit":

       exit()

   elif item == "out":

       total += round(total*0.0625,2)

       print("Your total is: ${}".format(total))

       deposit = int(input("How much money did you input? "))

       change_due = round(deposit - total,2)

       print("Your change due is ${}".format(change_due))

   else:

       print("Please choose an option or enter \"exit\" to exit the vending machine.")

week 3:

print("1. Skittles    2. M&M's\n3. Starbursts   4. Twizzlers\n5. Twix")

total = 0

while True:

   item = input("Enter the number of your item to be purchased: ")

   if item == "1":

       print("You chose skittles.")

       total += 2

   elif item == "2":

       print("You chose M&M's.")

       total += 2

   elif item == "3":

       print("You chose Starbursts.")

       total += 1

   elif item == "4":

       print("You chose Twizzlers.")

       total += 3

   elif item == "5":

       print("You chose Twix.")

       total += 4

   elif item == "exit":

       exit()

   elif item == "out":

       total += round(total * 0.0625, 2)

       print("Your total is: ${}".format(total))

       deposit = int(input("How much money did you input? "))

       while deposit < total:

           deposit = int(

               input("Please input a dollar amount greater than or equal to the total (whole numbers only): "))

       change_due = round(deposit - total, 2)

       if change_due == 0:

           print("No change due.")

       else:

           print("You are owed {} dollars and {} cents".format(int(change_due), round(change_due - int(change_due),2)))

   else:

       print("Please choose an option or enter \"exit\" to exit the vending machine.")

week 4:

def print_menu():

   print("1. Skittles    2. M&M's\n3. Starbursts   4. Twizzlers\n5. Twix    Enter \"out\" to checkout.")

def calculate_total(new_item):

   total = 0

   if new_item == "1":

       print("You chose skittles.")

       total += 2

   elif new_item == "2":

       print("You chose M&M's.")

       total += 2

   elif new_item == "3":

       print("You chose Starbursts.")

       total += 1

   elif new_item == "4":

       print("You chose Twizzlers.")

       total += 3

   elif new_item == "5":

       print("You chose Twix.")

       total += 4

   return total

def make_change(change_due):

   print(

       "Here is your change: {} dollars and {} cents".format(int(change_due), round(int(change_due) - change_due, 2)))

   print("Have a great day")

def amount_due(total_price):

   sales_tax = 0.0625

   final_price = total_price * +(total_price * sales_tax)

   print("Subtotal: {}".format(total_price))

   print("Final total: {}".format(final_price))

   deposit = int(input("Enter how much you deposited: "))

   while deposit < final_price:

       deposit = int(input("Enter an amount greater than or equal to {}".format(final_price)))

   make_change(deposit - final_price)

total = 0

while True:

   item = input("Enter the number of your item to be purchased: ")

   if item == "1":

       print("You chose skittles.")

       total += 2

   elif item == "2":

       print("You chose M&M's.")

       total += 2

   elif item == "3":

       print("You chose Starbursts.")

       total += 1

   elif item == "4":

       print("You chose Twizzlers.")

       total += 3

   elif item == "5":

       print("You chose Twix.")

       total += 4

   elif item == "exit":

       exit()

   elif item == "out":

       sales_tax = 0.0625

       total += round(total * sales_tax, 2)

       print("Your total is: ${}".format(total))

       deposit = int(input("How much money did you input? "))

       while deposit < total:

           deposit = int(

               input("Please input a dollar amount greater than or equal to the total (whole numbers only): "))

       change_due = round(deposit - total, 2)

       if change_due == 0:

           print("No change due.")

       else:

           print(

               "You are owed {} dollars and {} cents".format(int(change_due), round(change_due - int(change_due), 2)))

   else:

       print("Please choose an option or enter \"exit\" to exit the vending machine.")

I didn't implement the functions because the problem never stated that we had to. Best of luck.

You might be interested in
write the algorithm, flowchart and BASIC program to calculate the area of the rectangle length 50m and width 30m.​
GalinKa [24]

Answer:

The Basic Program is as follows:

10 LENGTH = 50

15 WIDTH = 30

20 AREA = WIDTH * LENGTH

25 PRINT AREA

30 END

The Algorithm is as follows:

1. Start

2. Let Length = 50

3. Let Width = 30

4. Compute Area = Length * Width

5. Display Area

6. Stop

See Attachment for flowchart (flowchart is designed using draw io tools)

Explanation:

The flowchart, algorithm and basic program all follow the same sequence and explanation

Using the basic program as a case study;

Line number 10: The program starts by initializing LENGTH to 50

Line number 15: It then initializes WIDTH to 30

Line number 20: The AREA is calculated by LENGTH * WIDTH

Line number 25: The value of AREA is printed afterwards

Line number 30: Lastly, the program stops execution

8 0
3 years ago
What can you do to make sure no one outside your company can gain access to its wireless network?
Oksana_A [137]

Disable SSID broadcasting, Lower radio energy groups, and Enable MAC filtering.

<h3>Why would you disable SSID broadcasting?</h3>
  • Disabling the SSID Broadcast is one method of ensuring your wireless web.
  • This procedure will stop other users from detecting your SSID or your wireless network title when they attempt to view the available wireless networks in your area.
  • The network character exists delivered to wireless devices, which is the reason for disabling the SSID broadcast.
  • A typical wireless adapter and its associated software will identify and list all available SSIDs for networks that are within range.
  • When somebody disables SSID broadcast on any of those networks, the network will no extended show up in the wireless adapter's list of known networks.

To learn more about Disable SSID broadcasting, refer to:

brainly.com/question/15289342

#SPJ4

The complete question is:

Your company shares a building with a competitor's branch office. Recently, you noticed that some computers other than company computer have tried to connect to the wireless network unsuccessfully. When you are in the parking lot, you also notice that the company's wireless network SSID can be seen on your smartphone.

What can you do to make sure no one outside your company can gain access to its wireless network?

6 0
2 years ago
​in older systems, often the user interface mainly consisted of _____ screens that allowed a user to send commands to the system
inessss [21]

Typically, in older systems, the GUI would be Text Based

7 0
3 years ago
Estate settlement is provided by banks through
natali 33 [55]
I believe the trust department.
8 0
4 years ago
We can use formatting before and after typing.​
Anika [276]

Answer:

i dont know but thanks for marks

8 0
3 years ago
Other questions:
  • How can presentation software be used in a business or professional setting? Choose all that apply.​
    8·1 answer
  • Susan is creating a spreadsheet, and she needs to enter the months of the year in column A. Susan should _____.
    15·2 answers
  • Which protocol below is used by email clients to send email
    8·1 answer
  • Which type of computer are todays most widely used personal computers?
    8·2 answers
  • Alison is having a hard time at work because her Inbox is flooded with emails every day. Some of these emails are unsolicited. S
    6·1 answer
  • HTML tag that makes a text field used by javascript statement
    6·1 answer
  • According the SDLC phases, which among these activities see a substantial amount of automation initiatives?
    12·2 answers
  • Do you need a separate password for each slack channel
    13·1 answer
  • C. List three obstacles to effective listening.
    8·1 answer
  • Pieter is a network administrator for a growing company and has decided to implement Kerberos. He knows that Kerberos uses a tic
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!