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
Evgesh-ka [11]
2 years ago
13

Can you help me with this question?

Computers and Technology
1 answer:
never [62]2 years ago
5 0

for var in list:

    print (var)

Explanation:

You might be interested in
A small grocery store has one checkout.You have been asked to write a program to simulate the grocery store as it checks out cus
Masteriza [31]

Answer:

Check the explanation

Explanation:

PYTHON CODE :

#import random function

from random import randint

#class Queue declaration

class Queue:

#declare methods in the Queue

def __init__(self):

self. items = []

def isEmpty(self):

return self. items == []

def enqueue(self, item):

self.items. insert(0, item)

def dequeue(self):

return self. items. pop()

def size(self):

return len(self. items)

def getInnerList(self):

return self.items

#This is customer Queue

class Customer:

#declare methods

def __init__(self,n):

self.numberOfItems=n

def __str__(self):

return str(self. numberOfItems)

def getNumberOfItems(self):

return self. numberOfItems

#This is expresscheker customer queue

class Expresschecker:

def __init__(self,n):

self.numberOfItems=n

def __str__(self):

return str(self. numberOfItems)

def getNumberOfItems(self):

return self. numberOfItems

#Returns random checkout time, based on number of items

def checkOut(Expresschecker):

items = Expresschecker. getNumberOfItems()

if items <= 10:

return randint(2, 5)

if items <= 20:

return randint(6, 9)

return randint(10, 14)

#Initiate queue for the Expresschecker

Expresschecker = Queue()

#declare total customers

totalcheckoutCustomers = 10

#express Customers shopping..

for i in range(totalcheckoutCustomers):

#Each putting Between 1 to 25 items

randomItemsQty = randint(1, 25)

customer = Customer(randomItemsQty)

#Getting into queue for checkout

Expresschecker. enqueue(customer)

#====Now all express Customers having

#random qty of items are in Queue======

#intial time

totalTime=0

#define the size of the queue

totalcheckoutCustomers = Expresschecker. size()

#using for-loop until queue is empty check out

#the items in the express cheker queue

while not(Expresschecker. isEmpty()):

totalTime+=randint(1,5)

#Picking a customer

expresscustomer = Expresschecker. dequeue()

#Processing the customer

timeTaken = checkOut(expresscustomer)

#add the time for each custimer

totalTime+=timeTaken

#compute average waiting time

averageWaitingTime = totalTime/totalcheckoutCustomers

#display the average waiting time

print("Average waiting time for the express customer queue is "

+str(averageWaitingTime)+" minutes ")

print("Remaining Custimers in the express customer Queue is: ",

Expresschecker. size())

#Returns random checkout time, based on number of items

def checkOut(customer):

items = customer. getNumberOfItems()

if items <= 10:

return randint(1, 5)

if items <= 20:

return randint(6, 10)

return randint(11, 15)

#in

customersQueue = Queue()

totalCustomers = 20 #Change number of customers here

#Customers shopping..

for i in range(totalCustomers):

#Each putting Between 1 to 25 items

randomItemsQty = randint(1, 25)

customer = Customer(randomItemsQty)

#Getting into queue for checkout

customersQueue. enqueue(customer)

#====Now all Customers having random qty

#of items are in Queue======

totalTime=0

totalCustomers = customersQueue. size()

while not(customersQueue. isEmpty()):

totalTime+=randint(1,5)

#Picking a customer

customer = customersQueue. dequeue()

#Processing the customer

timeTaken = checkOut(customer)

totalTime+=timeTaken

#Result=============================

averageWaitTime = totalTime/totalCustomers

print("Average wait time for the customer queue is

"+str(averageWaitTime)+" minutes ")

print("Remaining Customers in the customer Queue is:

",customersQueue. size())

5 0
3 years ago
need the answer ASAP. I’ll mark brainliest <br><br> they’re all the same options for each sentence.
KengaRu [80]

Answer:

Explanation:

pop(): Remove an item from the end of an array  

push(): Add items to the end of an array  

shift(): Remove an item from the beginning of an array  

unshift(): Add items to the beginning of an array

4 0
2 years ago
Decribe the components of an Microsoft<br>Windows desktop<br>​
damaskus [11]

Explanation:

the main component of Windows when you start your computer are the desktop, my computer, recycle bin , start button, Taskbar and shortcuts to application after opening an application you will also have a Windows with an active application which will appear in your desktop and taskbar.

3 0
3 years ago
Montoya Consumer Products Inc is implementing Service Cloud. They typically handle 50,000 customer inquiries per day. What shoul
maksim [4K]

Answer:

Option A is correct

Explanation:

It would help in building the right architecture and configuration that would decrease those operations times by a large magnitude like uploading or updating large number of records.

8 0
3 years ago
What's the difference between natural systems and man made systems <br>​
Aneli [31]

Answer:

Natural systems are already in place while man made systems were created by humans manipulating things in some way.

Explanation:

man made: human created

natural systems: existed without interference

5 0
2 years ago
Other questions:
  • Bill needs to make a presentation in which he has to represent data in the form of a pyramid. Which feature or menu option of a
    14·1 answer
  • A switch operates in the OSI reference model __________ layer and uses the __________ address to forward packets.
    8·1 answer
  • What may happen if there is too much harmony in a design?
    14·1 answer
  • An additional factor in how an element is rendered is that properties are passed from a parent element to its children in a proc
    15·1 answer
  • Yolanda lost her left foot during her military service, but she has been issued a prosthetic that enables her to walk normally,
    13·1 answer
  • Write a program that implement a bubble sort ?
    5·1 answer
  • You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
    5·1 answer
  • As a general rule, the number of bullet points on a slide should not exceed _____. a.2 b.4 c.8 d.10
    9·1 answer
  • How are computers used in education and entertainment? List them.​
    10·1 answer
  • Document templates are available online.<br> True<br> False
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!