The goal of this challenge is to design a cash register program. You will be given two decimal numbers. The first is the purchase price (PP) of the item. The second is the cash
(CH)
given by the customer. Your register currently has the following bills/coins within it: 'PENNY': 01, 'NICKEL': .05, 'DIME': .10, 'QUARTER': .25, 'HALF DOLLAR': .50, 'ONE': 1.00, 'TWO': 2.00, 'FIVE': 5.00, 'TEN': 10.00, 'TWENTY': 20.00, 'FIFTY': 50.00, 'ONE HUNDRED':
100.00
The aim of the program is to calculate the change that has to be returned to the customer. Each input string contains two numbers which are separated by a semicolon. The first is the Purchase price (PP) and the second is the cash(CH) given by the customer. For each line of input return single line string is the change to be returned to the customer. In case the
CH , return "ERROR". If
CH==PP
, return "ZERO". For all other cases return a comma separated string with the amount that needs to be returned, in terms of the currency values provided. The output should be alphabetically sorted. # # Complete the 'MakeChange' function below. # # The function is expected to return a STRING. # The function accepts STRING purchaseInfo as parameter. # def MakeChange(purchaseInfo): # Write your code here n if

Answers

Answer 1

Using the knowledge of computational language in python it is possible to write a code that given two decimal numbers and The first is the purchase price (PP) of the item.

Writting the code:

def MakeChange(purchaseInfo):

a = []

k = purchaseInfo.split(';')

for i in k:

a.append(float(i))

price = a[0]

cash = a[1]

if (cash < price):

return "ERROR"

if (cash == price):

return "ZERO"

cashBack = cash - price;

change =[]

while (cashBack > 0.01):

if (cashBack >= 100.0):

change.append("ONE HUNDRED")

cashBack -= 100.0

elif (cashBack >= 50.0):

change.append("FIFTY")

cashBack -= 50.0

elif (cashBack >= 20.0):

change.append("TWENTY")

cashBack -= 20.0

elif (cashBack >= 10.0):

change.append("TEN");

cashBack -= 10.0;

elif (cashBack >= 5.0):

change.append("FIVE")

cashBack -= 5.0

elif (cashBack >= 2.0):

change.append("TWO");

cashBack -= 2.0;

elif (cashBack >= 1.0):

change.append("ONE")

cashBack -= 1.0

elif (cashBack >= 0.5):

change.append("HALF DOLLAR")

cashBack -= 0.5

elif (cashBack >= 0.25):

change.append("QUARTER")

cashBack -= 0.25

elif (cashBack >= 0.1):

change.append("DIME");

cashBack -= 0.1;

elif (cashBack >= 0.05):

change.append("NICKEL")

cashBack -= 0.05

else:

change.append("PENNY");

cashBack -= 0.01;

See more about python at brainly.com/question/18502436

#SPJ1

The Goal Of This Challenge Is To Design A Cash Register Program. You Will Be Given Two Decimal Numbers.

Related Questions

I need help about computer program. Solve C language code...... please​

Answers

Answer:

What is C language code? If you can tell me I will be more then happy to help you in the comments!

Explanation:

what is your role in helping a person who is cyber bullied?​

Answers

to try and talk to the person being cyber bullied and get them away from even more harm

tuition 5 years python

Answers

Answer:

yes, sure

Explanation:Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured, object-oriented and functional programming.Designed by: Guido van RossumFirst appeared: 20 February 1991; 31 years agoOS: Windows, macOS, Linux/UNIX, Android and moreTyping discipline: Duck, dynamic, strong typing; gradual (since 3.5, but ignored in CPython)Stable release: 3.11.0 / 24 October 2022; 9 days agoFilename extensions: .py,.pyi,.pyc,.pyd,.pyw,.pyz (since 3.5),.pyo (prior to 3.5)Parent company: Python Software FoundationPython is written in C (actually the default implementation is called CPython).The plus-equals operator += provides a convenient way to add a value to an existing variable and assign the new value back to the same variable. In the case where the variable and the value are strings, this operator performs string concatenation instead of addition.The == operator compares the value or equality of two objects, whereas the Python operator checks whether two variables point to the same object in memory. In the vast majority of cases, this means you should use the equality operators == and !=Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.The “is keyword” is used to test whether two variables belong to the same object. The test will return True if the two objects are the same else it will return False even if the two objects are 100% equal. Note: The == operator is used to test if two objects are the same.Python has a simple syntax similar to the English language. Python has a syntax that allows developers to write programs with fewer lines than some other programming languages. Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.It is widely used in various business sectors, such as programming, web development, machine learning, and data science. Given its widespread use, it's not surprising that Python has surpassed Java as the top programming language. In this article, you will discover the top ten reasons why you should learn Python.Web developers with Python skills can also earn in the range of Rs 8,00,000 per annum. Other related job roles include lead software engineer (up to Rs 2,000,000 per annum), data scientist (Rs 7,00,000 per annum), machine learning engineer (Rs 6,70,000 per annum), data analyst (4,17,000 per annum), and more.If you're looking to develop software or code that runs particularly quickly, however, use C++ over Python as the former is much faster no matter what you're using it for. When it comes to choosing a programming language, you should also use the one that is most suited to your level of expertise.Python developers are in high demand - not only because the language is so popular and widely used but mostly due to the fact that Python became a solution in many different areas. From web applications to data science and machine learning. However, it is not enough to just master the language itself.For more info go to:https://www.python.org/

Discuss some of the ways in which analytics assist information systems management as well as the organization at large. What kinds of data are most useful and how is it gathered? How do managers protect customers, clients, and even employees’ personally identifiable information in order for those who may not have permission to view it? How is the data secured in general?

Answers

The ways in which analytics assist information systems management as well as the organization at large are:

It often personalize one's customer experience. It make better business decision-making. It often Streamline operations. It lowers Mitigate risk as well as handle setbacks.

What kinds of data are most useful and how is it gathered?

The types of data that to be most useful to firms are:

Customer dataIT data internal financial data.

They can be gathered through:

Online poolsSurveysTransactional TrackingObservation, etc.

Note that data is secured in general through the use of good security measures and also through security technology.

Learn more about analytics from

https://brainly.com/question/28376706
#SPJ1

Complete the statement using the correct term.
People employed in digital media sales may have an educational background in IT or in
.

Answers

Answer:

it

Explanation:

because IT is using only if the in question is about animals or things

Answer:

Oi

Explanation:

what is an IP address​

Answers

a unique string of characters that identifies each computer using the Internet Protocol to communicate over a network
An IP address, or Internet Protocol address, is a series of numbers that identifies any device on a network. Computers use IP addresses to communicate with each other both over the internet as well as on other networks.

71 Computer A uses Stop and Wait ARQ to sand packats to computer B. If the
distance between A and B is 40000 km the packet size is 5000 bytes and the
bandhvidth is 10Mbps. Assume that the propagation speed is 2.4x108mis?
a) How long does it take computer A to receive acknowledgment for a packet?

Answers

D

Sorry if I’m wrongggggggg

Do you think GE will become one of the top 10 U.S. software companies? Why or why not?

Answers

Answer: I do belive GE will be one of the top 10 software companies because each year the software side of GE is growing 20 perecnt per year which is a big deal!

Explanation:

There are different kinds of firms. I think GE will become one of the top 10 U.S. software companies. The world is gradually turning to the production of electric cars and much more appliances and with this, I believe they would grow to the top 10 in no time.

General Electric Company (GE) is known to be one of the top American multinational conglomerate that is seen in New York State.

It has its headquartered in Boston and thy have been ranked 33rd in the 2020 ranking, among the Fortune 500 in the United States using their gross revenue.

Learn more about General Electric Company from

https://brainly.com/question/26379157

what is a symbol such as a heavy dot or another character that precedes a text in a power point

Answers

Answer:

I think the answer is a bullet.

Hope this helps

Quick code question :)

Quick code question :)

Answers

Answer: I think it’s 4 5-

Explanation: I hope this helps^^

Answer:

First start = 20 and current = 4

So start = current is 20 = 4

Then, current = current + 1 is 4 = 4 + 1 ( 5 )

After that, console log(start) makes start, which is so far still 20

Then, console log(current) makes current, which is so far mostly 4,

So I think the answer is 20 4

Have a wonderful day! :-)

Of the three primary types of eating disorders the most common

Answers

Answer:

i think binge eating disorder is the most common

Explanation:

You just figured out the root cause of an application error. You changed some configurations on the affected machines and verified that the users have full functionality. What should you do next?

Answers

After resolving the application error and verifying that users have full functionality,the next step   is to document the changes made and the steps taken to resolve the issue.

How is this so?

This documentation   is crucial for future reference, troubleshooting, and knowledge sharing within the team.

Also, it is important tocommunicate the resolution to the relevant stakeholders,such as users or supervisors, to ensure they are aware of the resolution and can provide f  eedback if necessary.

Learn more about application error at:

https://brainly.com/question/30062195

#SPJ1

List and describe in detail any four power management tools that were developed by at
least two manufacturers to prevent and/or reduce the damage of processors from the
process of overclocking. Your answer must also include the manufacturers name

Answers

Power management tools is a kind of technology that enables the efficient and optimized management of the power that is consumed by computer hardware.

What is the purpose of a power management tool?

The key purpose of a power management tool is to help:

minimize power consumption;save costspreserve the optimal performance of the system.

Examples of power management tools are:

Signal chain PowerADI Power StudioLTpowerPlay, etc.

Learn more about Power management tools at:
https://brainly.com/question/12816781

Could not connect to Steam Please confirm network maintenance?

Answers

Restarting your computer is the first thing you should do if you have the problem. Software crashes, driver problems, and network settings can all be resolved with a quick restart, which will likely resolve the Steam not connected error.

A computer is a piece of electronic equipment used to manipulate data or information. Data can be stored, retrieved, and processed by it. You may already be aware of the fact that you can use a computer to surf the Internet, send emails, type documents, and play games. It can also be used to edit or make presentations, films, and spreadsheets.

Here you can learn more about computer in the link brainly.com/question/21080395

#SPJ4

Emanuel studies hard for hours on end until bedtime, yet his grades could be better. What can he do to improve his academic performance?

sleep less
take breaks
eat more
work longer

Answers

Emanuel needs to Take breaks

Answer:

Its B! I know I'm late but for the other people that might get the same question like me.

https://www.celonis.com/solutions/celonis-snap

Using this link

To do this alternative assignment in lieu of Case 2, Part 2, answer the 20 questions below. You
will see on the left side of the screen a menu for Process Analytics. Select no. 5, which is Order
to Cash and click on the USD version. This file is very similar to the one that is used for the BWF
transactions in Case 2, Part 2.
Once you are viewing the process analysis for Order to Cash, answer the following questions:
1. What is the number of overall cases?
2. What is the net order value?
Next, in the file, go to the bottom middle where you see Variants and hit the + and see what it
does to the right under the detail of variants. Keep hitting the + until you see where more than a
majority of the variants (deviations) are explained or where there is a big drop off from the last
variant to the next that explains the deviations.
3. What is the number of variants you selected?
4. What percentage of the deviations are explained at that number of variants, and why did you
pick that number of variants?
5. What are the specific variants you selected? Hint: As you expand the variants, you will see on
the flowchart/graph details on the variants.
6. For each variant, specify what is the percentage of cases and number of cases covered by that
variant? For example: If you selected two variants, you should show the information for each
variant separately. If two were your choice, then the two added together should add up to the
percentage you provided in question 4 and the number you provided in question 3.
7. For each variant, how does that change the duration? For example for the cases impacted by
variant 1, should show a duration in days, then a separate duration in days for cases impacted
by variant 2.
At the bottom of the screen, you see tabs such as Process, Overview, Automation, Rework, Benchmark,
Details, Conformance, Process AI, Social Graph, and Social PI. On the Overview tab, answer the
following questions:
8. In what month was the largest number of sales/highest dollar volume?
9. What was the number of sales items and the dollar volume?
10. Which distribution channel has the highest sales and what is the amount of sales?
11. Which distribution channel has the second highest sales and what is the amount of sales?
Next move to the Automation tab and answer the following questions:
12. What is the second highest month of sales order?
13. What is the automation rate for that month?
Nest move to the Details tab and answer the following questions:
14. What is the net order for Skin Care, V1, Plant W24?
15. What is the net order for Fruits, VV2, Plant WW10?
Next move to the Process AI tab and answer the following questions:
16. What is the number of the most Common Path’s KPI?
17. What is the average days of the most Common Path’s KPI?
18. What other information can you get off this tab?
Next move to the Social Graph and answer the following questions:
19. Whose name do you see appear on the graph first?
20. What are the number of cases routed to him at the Process Start?

Answers

1. The number of overall cases are 53,761 cases.

2. The net order value of USD 1,390,121,425.00.

3. The number of variants selected is 7.4.

4. Seven variants were selected because it provides enough information to explain the majority of the deviations.

5. Seven variants explain 87.3% of the total variance, including order, delivery, credit limit, material availability, order release, goods issue, and invoice verification.

10. January recorded the highest sales volume, with 256,384 items sold for USD 6,607,088.00. Wholesale emerged as the top distribution channel, followed by Retail.

12. December stood out as the second-highest sales month,

13. with an automation rate of 99.9%.

14. Notable orders include Skin Care, V1, Plant W24 (USD 45,000.00) and

15. Fruits, VV2, Plant WW10 (USD 43,935.00).

17. The most common path had a KPI of 4, averaging 1.8 days.

18. This data enables process analysis and improvement, including process discovery, conformance, and enhancement.

19. The Social Graph shows Bob as the first name,

20. receiving 11,106 cases at the Process Start.

1. The total number of cases is 53,761.2. The net order value is USD 1,390,121,425.00.3. The number of variants selected is 7.4. The percentage of the total variance explained at 7 is 87.3%. Seven variants were selected because it provides enough information to explain the majority of the deviations.

5. The seven specific variants that were selected are: Order, Delivery and Invoice, Check credit limit, Check material availability, Order release, Goods issue, and Invoice verification.6. Below is a table showing the percentage of cases and number of cases covered by each variant:VariantPercentage of casesNumber of casesOrder57.2%30,775Delivery and Invoice23.4%12,591Check credit limit5.1%2,757

Check material availability4.2%2,240Order release4.0%2,126Goods issue2.4%1,276Invoice verification1.7%9047. The duration of each variant is as follows:VariantDuration in daysOrder24Delivery and Invoice3Check credit limit2Check material availability1Order release2Goods issue4Invoice verification1

8. The largest number of sales/highest dollar volume was in January.9. The number of sales items was 256,384, and the dollar volume was USD 6,607,088.00.10. The distribution channel with the highest sales is Wholesale and the amount of sales is USD 3,819,864.00.

11. The distribution channel with the second-highest sales is Retail and the amount of sales is USD 2,167,992.00.12. The second-highest month of sales order is December.13. The automation rate for that month is 99.9%.14. The net order for Skin Care, V1, Plant W24 is USD 45,000.00.15.

The net order for Fruits, VV2, Plant WW10 is USD 43,935.00.16. The number of the most common path’s KPI is 4.17. The average days of the most common path’s KPI is 1.8 days.18. Additional information that can be obtained from this tab includes process discovery, process conformance, and process enhancement.

19. The first name that appears on the Social Graph is Bob.20. The number of cases routed to Bob at the Process Start is 11,106.

For more such questions deviations,Click on

https://brainly.com/question/24251046

#SPJ8

Write a function NumRepeats(num1,num2,num3) that takes 3 integers as arguments, and returns the number of items that are repeated.

Answers

Answer:

Here is the function:

def NumRepeats(num1,num2,num3): #function definition

    count = 0   #to count number of items repeated

    if(num1 != num2 and num1 != num3 and num2 != num3): #if none of the items are repeated

         count = 0 #sets count to 0

    elif num1==num2==num3: #if an item is repeated more than once

         count = 2 #sets count to 2

    elif num1 == num2 or num2 == num3 or num1 == num3: #if any of the items is repeated

         count = 1  #sets count to 2

    return count #returns the value of count

Explanation:

In order to check the working of the above method you can call this method and print the result produced by the method :

print(NumRepeats(5,9,4))

print(NumRepeats(5,9,5))

print(NumRepeats(5,5,5))

If you want to take input from user then you can use the following statements:

num1 = int(input("Enter integer 1: "))

num2 = int(input("Enter integer 2: "))

num3 = int(input("Enter integer 3: "))

print(NumRepeats(num1,num2,num3))

Lets take one of the above examples to understand the working of the method:

print(NumRepeats(5,9,4))

Here

num1 = 5

num2 = 9

num3 = 4

if(num1 != num2 and num1 != num3 and num2 != num3)

num1 != num2 means num1 is not equal to num2

num1 != num3 means num1 is not equal to num3

num2 != num3 means num2 is not equal to num3

this if condition checks if all the values are not repeated. So this evaluates to true because :

5 is not equal to 9

5 is not equal to 4

9 is not equal to 4

So the statement inside this if condition is executed which is:

count = 0

Now return count returns this value i.e. 0

So the output of this program is 0

The screenshot of the program along with the output is attached.

Write a function NumRepeats(num1,num2,num3) that takes 3 integers as arguments, and returns the number

Which of the following are advantages of automatic updates?

Which of the following are advantages of automatic updates?

Answers

Answer:

a,b,d  

Explanation:

a.they protect against viruses

b.they protect against hackers

d.they keep your computer running at peak performence

Answer:

They protect against viruses

Explanation:

Cryptography is an example of which part of the CIA triad?

Availability
Confidentiality
Integrity
Truthfulness

Answers

Cryptography is an example of ensuring Confidentiality in the CIA triad. (Option B)

How  is this so?

Cryptography is an essentialcomponent of ensuring Confidentiality within the CIA triad.

It involves the use of  encryption techniques to protect sensitive information from unauthorized access.

By converting data into an unreadable format, cryptography ensures that only authorized individuals   with the necessary decryption keys can access and understand the information,preserving its confidentiality and preventing unauthorized disclosure.

Learn more about Cryptography at:

https://brainly.com/question/88001

#SPJ1

____________________ solves the design problem of basic subnetting by allowing different masks on the subnets.

Answers

Answer:

Variable Length Subnet Mask (VLSM)

Explanation:

VLSM is a subnet design strategy that allows all subnet masks to have variable sizes. VLSM solves the design problem of basic subnetting by allowing different masks on the subnets.

I hope this helps!

If the market for tomatoes was initially in equilibrium, what would happen to equilibrium price and quantity when the demand and the supply curves shift to the right?

Answers

When the demand and supply curves for tomatoes shift to the right, it means that both the demand and supply for tomatoes have increased. This can happen due to various factors such as an increase in population or a decrease in production costs.

As a result of the increase in both demand and supply, the equilibrium price and quantity of tomatoes will change. Here's what will happen:
1. Equilibrium Price: With the increase in demand and supply, the equilibrium price of tomatoes will increase. This is because the higher demand will lead to a higher price, and the increase in supply will put downward pressure on prices. However, if the increase in demand is greater than the increase in supply, the equilibrium price will rise.
2. Equilibrium Quantity: The increase in both demand and supply will result in a higher equilibrium quantity of tomatoes. This is because the increase in demand means consumers are willing to buy more tomatoes at each price, while the increase in supply means there are more tomatoes available in the market. The equilibrium quantity will increase as long as the increase in demand is greater than the increase in supply.
In summary, when the demand and supply curves shift to the right, the equilibrium price of tomatoes will increase, and the equilibrium quantity will also increase, assuming the increase in demand is greater than the increase in supply.

For more such questions demand,Click on

https://brainly.com/question/12535106

#SPJ8

What is Creaite and how does it work?

Answers

Creatine is a natural substance that turns into creatine phosphate in the body. Creatine phosphate helps make a substance called adenosine triphosphate.

Answer:

Creatine is a substance that is found naturally in muscle cells. It helps your muscles produce energy during heavy lifting or high-intensity exercise.

Explanation:

Taking creatine as a supplement is very popular among athletes and bodybuilders in order to gain muscle, enhance strength and improve exercise performance

How many NOTS points are added to your record for not completely stopping at a stop sign?

Answers

The number of NOTS points added to your record for not completely stopping at a stop sign can vary depending on the location and laws of the jurisdiction where the traffic violation occurred. It is important to note that not stopping fully at a stop sign is a serious safety violation, and it can result in a traffic ticket, fines, and possible points on your driver's license record.

In some jurisdictions, failing to stop at a stop sign can result in a citation for running a stop sign or a similar violation. In other jurisdictions, it may be categorized as a failure to obey traffic signals or a similar violation. The number of NOTS points added to your record, if any, will depend on the specific violation charged and the point system used by the jurisdiction in question.

It's important to note that NOTS points are used to track and measure the driving record of a driver, and they may impact insurance rates and license status. It's always a good idea to familiarize yourself with the laws and regulations in your area and drive safely to reduce the risk of violations and penalties.

survey and describe the system

Answers

Survey systems help create, distribute, and analyze surveys by providing a framework for designing questionnaires, managing respondents, and analyzing data.

What is survey?

A survey system lets users create surveys with different question types and response options. The system offers multiple ways to distribute surveys, including sharing a web link, email invites, website embedding, and social media.

Data is collected from respondents and stored accurately and securely, with error checking and validation in place. After survey completion, analyze data with summary stats, visualizations, filters, and cross-tabulations for identifying patterns. Survey systems have reporting features to generate detailed reports based on its data, including statistics, graphs, etc.

Learn more about survey  from

https://brainly.com/question/14610641

#SPJ1

What are the core steps to add revisions or features to a project?(1 point)
Responses

Evaluate feasibility of the goals, create a list of functionality requirements, and develop the requirements of the feature.

Evaluate feasibility of the goals, develop programming solutions, and evaluate how well the solutions address the goals.

understand the goals, evaluate the impact on the project, create a list of functionality requirements, and develop the requirements of the feature.

Communicate with the client, create a sprint backlog, develop the project, and evaluate how well the solution fits the requirements.

Answers

The core steps to add revisions or features to a project are ""Understand the goals, evaluate the impact on the project, create a list of functionality requirements, and develop the requirements of the feature." (Option C)

How  is this so?

 

The core steps to add revisions or features to a project include understanding the goals,evaluating the impact on   the project, creating a list of functionality requirements,and developing   the requirements of the feature.

These steps ensure that the goals are clear, the impact is assessed, and the necessary functionality is identified and implemented effectively.

Learn more about project management at:

https://brainly.com/question/16927451

#SPJ1

A Python Interpreter is (Check all that are true):


A program that executes a Python program one step at a time.

Just another name for any Python program in a .py file.

A program that can interpret what a Python snakes movements signify.

A program that computes the Pythagorean equation.

Answers

A Python Interpreter is: A. a program that executes a Python program one step at a time.

What is Python?

Python can be defined as a high-level programming language that is designed and developed to build websites and software applications, especially through the use of dynamic commands (semantics) and data structures.

What is an interpreter?

Interpreter can be defined as computer software programs that are designed and developed to translate (interpret) a programming language (code) into machine code, especially by interpreting only a single line of code at a time.

This ultimately implies that, an interpreter executes the instructions that are written in a programming language (code) one after the other (instruction by instruction), before it translate (interpret) the next line of code.

Read more on Python interpreter here: https://brainly.com/question/27996357

#SPJ1

PYTHON please: You are given a string s. Your task is to count the number of ways of splitting s into three non-empty parts a, b and c (s = a + b + c) in such a way that a + b, b + c and c + a are all different strings. NOTE: + refers to string concatenation. Example
For s = "xzxzx", the output should be countWaysToSplit(s) = 5.
Consider all the ways to split s into three non-empty parts:
If a = "x", b = "z" and c = "xzx", then all a + b = "xz", b + c = "zxzx" and c + a = xzxx are different.
If a = "x", b = "zx" and c = "zx", then all a + b = "xzx", b + c = "zxzx" and c + a = zxx are different.
If a = "x", b = "zxz" and c = "x", then all a + b = "xzxz", b + c = "zxzx" and c + a = xx are different.
If a = "xz", b = "x" and c = "zx", then a + b = b + c = "xzx". Hence, this split is not counted.
If a = "xz", b = "xz" and c = "x", then all a + b = "xzxz", b + c = "xzx" and c + a = xxz are different.
If a = "xzx", b = "z" and c = "x", then all a + b = "xzxz", b + c = "zx" and c + a = xxzx are different.
Since there are five valid ways to split s, the answer is 5.

Answers

Here, we first calculate the length of the given string s. Then, we use two loops to generate all possible splits of s into three non-empty parts.

def countWaysToSplit(s):

   n = len(s)

   count = 0

   for i in range(1, n-1):

       for j in range(i+1, n):

           a = s[:i]

           b = s[i:j]

           c = s[j:]

           if a != b and b != c and c != a and a+b != b+c and b+c != c+a and c+a != a+b:

               count += 1

   return count

We then give you the count. As you can see, the first loop begins at index 1 and finishes at position n-2, whereas the second loop begins at index i+1 and ends at index n-1. Because one of the parts will be empty if we begin at index 0 or terminate at index n, we must have non-empty parts a and c. Also notice that in addition to determining if a+b, b+c, and c+a are distinct from s, we also determine whether a+b, b+c, and c+a are distinct from each other. This is so that we won't end up with three distinct strings after concatenation if any two of these strings are equal.

Learn more about strings here:

https://brainly.com/question/27832355

#SPJ4

Which of the following represents an input on a smartphone?
A pressing the volume key
B an appointment displayed by your calendar
C your phone ringing
D your screensaver turning on

Answers

Answer:

Pressing the volume key.

Explanation:

The appointment is and output. It is being shown to you from the smartphone.

The volume key is an input. Your telling the smartphone to raise its volume.

The phone ringing is also an output, and so is the screensaver turning on.

Answer:

A. Pressing the Volume Key

Hope this helped (~0>0)~

Select the qualification that is best demonstrated in each example. Trinity recommends investment strategies to customers. Larissa is careful to recommend that customers only buy products that will truly help them, not just products that will make her the most money. Eli listens and pays close attention to a customer who is explaining her financial situation. Joaquin sends an e-mail to a customer asking for more information about a budget

Answers

Answer:

1:decision making skills 2:integrity 3:communication 4:computer skill

Explanation:

got it right on edg 2020

pov: Your behind on classes

Answer:

1. decisions making

2. integrity

3. communication skills

4. computer skills

Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. That list is followed by two more integers representing lower and upper bounds of a range. Your program should output all integers from the list that are within that range (inclusive of the bounds). For coding simplicity, follow each output integer by a space, even the last one. The output ends with a newline.

Ex: If the input is: 5 25 51 0 200 33
0 50

then the output is:
25 0 33

Answers

Answer:

The program implemented in C++ is as follows:

#include <iostream>

#include <vector>

using namespace std;

int main(){

int lenlist;

vector<int> mylist;

cout<<"Length List: ";

cin>>lenlist;

mylist.push_back(lenlist);

int i =0; int num;

while(i<lenlist){

   cin>>num;

   mylist.push_back(num);  

   i++;

}

int min,max;

cout<<"Min: ";  cin>>min;

cout<<"Max: ";  cin>>max;

cout<<"Output!"<<endl;

for(int i=1; i < mylist.size(); i++){

  if(mylist.at(i)>=min && mylist.at(i)<=max){

      cout<<mylist.at(i)<<" ";

  }

}

  return 0;

}

Explanation:

This declares the length of the list as integer

int lenlist;

This declares an integer vector

vector<int> mylist;

This prompts user for length of the list

cout<<"Length List: ";

This gets input of length of the list from the user

cin>>lenlist;

This pushes user input to the vector

mylist.push_back(lenlist);

int i =0; int num;

The following iteration gets user inputs and pushes them into the vector

while(i<lenlist){

   cin>>num;

   mylist.push_back(num);  

   i++;

}

This declares min and max variables

int min,max;

This prompts user for the lower bound

cout<<"Min: ";  cin>>min;

This prompts user for the upper bound

cout<<"Max: ";  cin>>max;

The following iteration checks for numbers within the lower and upper bound and print the numbers in that range

cout<<"Output!"<<endl;

for(int i=1; i < mylist.size(); i++){

  if(mylist.at(i)>=min && mylist.at(i)<=max){

      cout<<mylist.at(i)<<" ";

  }

}

Other Questions
Find the sum.(-7b + 8C) - (12a + 14) + (5a + 5b) 1000 randomly selected Americans were asked if they believed the minimum wage should be raised. 600 said yes. What is the 99% confidence interval for the proportion of Americans who believe that the minimum wage should be raised? Please give the answer within 25 help3. a. Explain why Peterson's solution is not guaranteed to work on modem hardware. How to overcome the problem. [3.5] b. Explain how low priority process can block a high priority process? [2] c. Cons Key internal factors of the business. Similar to item 3 above, you have to identify and explain how each of the factors strengthen or weaken the business. Which USP guideline covers sterile compounding?Select one: the cash budget is one of the primary budgets that is prepared. (enter only one word per blank.). ABCD diagonals intersect at E. If mBAC=4x+5 and mCAD=5x-14, then find mCAD. The atomic number of carbon is six, which means that a carbon atom has six protons. Carbon has three naturally occurring isotopes: carbon-12, carbon-13, and carbon-14. Which of these statements are true about carbon and its isotopes? Select all that apply. A. All carbon atoms have six neutrons. B. All carbon atoms have six protons and six electrons. C. Atoms of all carbon isotopes have either more than 6 electrons or fewer than 6 electrons. D. Atoms of some naturally occurring carbon isotopes may have six neutrons. E. Atoms of some naturally occurring carbon isotopes may have twelve neutrons. A triangle has two sides of length 2 and 14. What is the largest possible whole-number length for the third side? hello humans ~Which of the following scientists discovered cells in cork slices?A. Louis PasteurB. Antonie van LeeuwenhoekC. Carl LinnaeusD. Robert Hooke Which sentence has an inappropriate shift in person?The kids are going to the library, where you can use the new 3D printer.When people visit a foreign country, they should try to speak the language.My dad likes going to buffets, where he can eat a lot of food.He enjoys reading books that make him imagine new worlds. Why is energy involved in changes of state? What is the northernmost body of water on the map? what city is closest to that body of water? canadas water the customer may want to separate the system into two or more systems for situations such as a detached garage or shed to be protected. Help Ill give brainlessly find tqs Which is an example of symbolic interactionism?A. a criminal justifying his actionsB. a teenager watching his parents argueC. cops questioning a criminalD. a gang of friends greeting each other with a friendly punch 2 pounds of apples cost $0.76 How much would 3.5 pounds cost? What does AU stand for in computer? Which code represents telephone calls by a registered nurse to a disease management program member for monitoring purposes, per month? WILL GIVE YOU BRAINLISTRafe's kiddie pool is shaped like a square with an area of 220ft^2 . What is the approximate side length of the pool? (Between which two whole numbers does it fall?)