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
Butoxors [25]
3 years ago
8

A ___________ variable is used to add up a set of values. fill in the blank

Computers and Technology
1 answer:
TEA [102]3 years ago
3 0

Answer:

dependent variable -- As it depends on the other variables, changes when they change

You might be interested in
Can you see it now ivy97? I've posted it again.
Vlada [557]
There is no picture? What’s the question?
3 0
4 years ago
Which of the following is the first step in a lockout-and-tag procedure? A. Place your lock on the breaker or switch. B. Sign yo
yKpoI14uk [10]
The answer is C. Shut off the Electricity to the machine at the breaker m. hope this helps
4 0
4 years ago
Read 2 more answers
Develop a program working as a soda vending machine. The program should show the product menu with price and take user input for
Kipish [7]

Answer:

Explanation:

The following vending machine program is written in Python. It creates various functions to checkItems, check cash, check stock, calculate refund etc. It calls all the necessary functions inside the main() function. The output can be seen in the attached picture below.

class Item:

   def __init__(self, name, price, stock):

       self.name = name

       self.price = price

       self.stock = stock

   def updateStock(self, stock):

       self.stock = stock

   def buyFromStock(self):

       if self.stock == 0:

           # raise not item exception

           pass

       self.stock -= 1

class VendingMachine:

   def __init__(self):

       self.amount = 0

       self.items = []

   def addItem(self, item):

       self.items.append(item)

   def showItems(self):

       print('Items in Vending Machine \n----------------')

       for item in self.items:

           if item.stock == 0:

               self.items.remove(item)

       for item in self.items:

           print(item.name, item.price)

       print('----------------\n')

   def addCash(self, money):

       self.amount = self.amount + money

   def buyItem(self, item):

       if self.amount < item.price:

           print('You can\'t but this item. Insert more coins.')

       else:

           self.amount -= item.price

           item.buyFromStock()

           print('You chose ' +item.name)

           print('Cash remaining: ' + str(self.amount))

   def containsItem(self, wanted):

       ret = False

       for item in self.items:

           if item.name == wanted:

               ret = True

               break

       return ret

   def getItem(self, wanted):

       ret = None

       for item in self.items:

           if item.name == wanted:

               ret = item

               break

       return ret

   def insertAmountForItem(self, item):

       price = item.price

       while self.amount < price:

               self.amount = self.amount + float(input('insert ' + str(price - self.amount) + ': '))

   def calcRefund(self):

       if self.amount > 0:

           print(self.amount + " refunded.")

           self.amount = 0

       print('Thank you!\n')

def main():

   machine = VendingMachine()

   item1 = Item('Kit Kat',  1.5,  2)

   item2 = Item('Potato Chips', 1.75,  1)

   item3 = Item('Snickers',  2.0,  3)

   item4 = Item('Gum',  0.50, 1)

   item5 = Item('Doritos',0.75,  3)

   machine.addItem(item1)

   machine.addItem(item2)

   machine.addItem(item3)

   machine.addItem(item4)

   machine.addItem(item5)

   print('Welcome!\n----------------')

   continueBuying = True

   while continueBuying == True:

       machine.showItems()

       selected = input('select item: ')

       if machine.containsItem(selected):

           item = machine.getItem(selected)

           machine.insertAmountForItem(item)

           machine.buyItem(item)

           a = input('buy something else? (y/n): ')

           if a == 'n':

               continueBuying = False

               machine.calcRefund()

           else:

               continue

       else:

           print('Item not available. Select another item.')

           continue

if __name__ == "__main__":

   main()

8 0
3 years ago
Someone knows a good compiler for iPad? It has to be an app
aksik [14]
Jedona is a good one
5 0
3 years ago
Write an expression that evaluates to true if the value of the integer variable numberOfPrizes is divisible (with no remainder)
Marianna [84]

Answer:

numberOfPrizes%numberOfParticipants==0

Explanation:

  • Above expression includes % sign, which means mod.
  • Mod of a value with another makes the 1st value divide by 2nd and return the remainder.
  • As numberOfParticipants cant be zero (given), the answer must be a proper number.
  • If numberOfPrizes is completely divisible by numberOfParticipants then it will return 0 as shown in above expression. True case.
  • If a digit other than 0 is a result then it will be false.
5 0
3 years ago
Other questions:
  • What type of device is the printer?
    13·2 answers
  • What is cyber stalking and how does it work?
    7·2 answers
  • Steps in the systems development life cycle​
    15·2 answers
  • Refer to the exhibit. One end of the cable is terminated as displayed, and the other end is terminated in accordance with the T5
    7·1 answer
  • A cubit is an ancient unit of length, roughly the distance between one’s fingers and elbow. The definition of one cubit is 18 in
    12·1 answer
  • There are four types of characteristics attributed to a flow: reliability, delay, jitter, and bandwidth. Explain how each of the
    8·1 answer
  • The character you control enters the Mystic Palace. Once inside, you find that the game’s world turns upside down. Standing on t
    9·2 answers
  • What is dialog box? ​
    7·1 answer
  • The network team has well established procedures to follow for creating new rules on the firewall. This includes having approval
    15·1 answer
  • Nobody mind this plz
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!