I have the following python code. I get the following message when running it using a test script which I cannot send here:
while textstring[iterator].isspace(): # loop until we get other than space character
IndexError: string index out of range. Please find out why and correct the code.
def createWords(textstrings):
createdWords = [] # empty list
for textstring in textstrings: # iterate through each string in trxtstrings
iterator = 0
begin = iterator # new begin variable
while (iterator < len(textstring)): # iterate through each character in the string
finished = iterator # new finished character
while textstring[iterator].isspace(): # loop until we get other than space character
iterator = iterator+1
word = textstring[begin:finished+1].strip() # extract the word from begin position to before the space character,
# textstring[begin,finshed] ; strip() will remove white spaces at ends
if (word): # if word is not empty
createdWords.append(word) # append new word to createWords
begin = iterator # update begin value with current iterator position
if (textstring[iterator]).isalpha():
if (textstring[iterator].isupper()): # if letter is in uppercase change it to lower case by using letter.lower() method.
textstring = textstring[:iterator] + textstring[iterator].lower() + textstring[iterator+1:]
print(textstring[iterator],"this a letter")
elif (textstring[iterator]).isdigit():
print(textstring[iterator],"is a digit")
else:
print(textstring[iterator],"this a symbol")
word = textstring[begin:finished].strip() # extract the word from begin position to before the symbol character,
# textstring[begin,finshed] ; strip() will remove white spaces at ends
createdWords.append(word) # append new word to createWords
begin = iterator # update begin value with current iterator position
iterator= iterator+1 # increment iterator value
word = textstring[begin:iterator].strip() # extract the word from begin position to the end of the string
createdWords.append(word) # append new word to createWords
return createdWords # return createWordsIn: Computer Science
SOLUTION IN JAVA LANGUANGE NEEDED. JAVA LANGUAGE
QUESTION.
NOTE - Submission in parts. Parts required - Dog Class
Code, Dog Manager Class Code and the main code. Please
differentiate all three in the answer.
This Assignment is designed to take you through the process of creating basic classes, aggregation and manipulating arrays of objects.
Scenario:
A dog shelter would like a simple system to keep track of all the dogs that pass through the facility.
The system must record for each dog:
dogId (int) - must be unique
name (string)
age (double) - cannot be less than 0 or more than 25
breed (string)
sex (char) – m for male, f for female
foundHome (bool) - true means the dogs has been places in a home false otherwise.
You must create an object oriented solution with a text based menu as summarized on the next page. The system must check that valid data is entered. For example, the menu has four items so only 1 to 5 must be allowed as input from the menu.
Summary of Operations
System Menu:
Add dog
View all dogs
View all available dogs
View dog
Update dog home status
exit
Overview:
Add Dog:
When a dog is added to the system, you must check that the dogId is not already used in the system. All new dogs have no home as yet (foundHome = false).
View all Dogs:
This menu option shows all dogs in the system. This includes dogs that have a home and those that do not.
View all available dogs:
Shows all dogs in the system, that have no homes as yet.
View dog:
Asks the user for a dogId and then displays the dog information if found and “There is no dog with that id..” if it is not found.
Update dog home status:
Asks the user for a dogId. If a dog with that id is found, the “foundHome” status is changed to true and the dog information is to be displayed. If the dog is not found the message “There is no dog with that id..” should be displayed.
In: Computer Science
NOTE - Submission in parts. Parts required - Dog Class Code, Dog
Manager Class Code and the main code. Please differentiate all
three in the answer.
This Assignment is designed to take you through the process of creating basic classes, aggregation and manipulating arrays of objects.
Scenario:
A dog shelter would like a simple system to keep track of all the dogs that pass through the facility.
The system must record for each dog:
dogId (int) - must be unique
name (string)
age (double) - cannot be less than 0 or more than 25
breed (string)
sex (char) – m for male, f for female
foundHome (bool) - true means the dogs has been places in a home false otherwise.
You must create an object oriented solution with a text based menu as summarized on the next page. The system must check that valid data is entered. For example, the menu has four items so only 1 to 5 must be allowed as input from the menu.
Summary of Operations
System Menu:
Overview:
Add Dog:
When a dog is added to the system, you must check that the dogId is not already used in the system. All new dogs have no home as yet (foundHome = false).
View all Dogs:
This menu option shows all dogs in the system. This includes dogs that have a home and those that do not.
View all available dogs:
Shows all dogs in the system, that have no homes as yet.
View dog:
Asks the user for a dogId and then displays the dog information if found and “There is no dog with that id..” if it is not found.
Update dog home status:
Asks the user for a dogId. If a dog with that id is found, the “foundHome” status is changed to true and the dog information is to be displayed. If the dog is not found the message “There is no dog with that id..” should be displayed.
In: Computer Science
Country Profile
Choose a country.
This assignment will be completed on your own. The object of this assignment is to analyze the economic health and productivity of a country. You will need to gather data and then analyze the data and supply a recommendation as to whether your fictional boss should open a business in this country. Begin by gathering economic data, a list of where to start is below (these are only some, you should think of other data points that will aid your analysis:
GDP
Population
Inflation rate
Unemployment rate
Worker productivity (there are a number of calculations for this)
Exchange rate
Total debt – government and individual
Government deficits
Mean or median population age
Labour force participation rate
Exports
Imports
Once you have gathered sufficient data please analyze that data to determine if this country would be a good country to open a business in.
This paper should be 2-3 pages long and use proper APA citations.
In: Economics
As an IT professional, you are likely to face many situations when a decision needs to be made. In many cases, the decision or choice is straight forward, requiring only technical and business judgement. In other cases, the situation is ambiguous from an ethical or professional viewpoint and you might not be certain of which decision is the right one.
Context of Choosen Workplace: Application developer
-Explain the context of the chosen workplace
. -Explain the ambiguous scenario you selected and clarify the source of ambiguity.
-Analyse the given scenario in the light of the ethical and professional responsibility of IT professionals and the relevant codes of conduct and professional practice. Point to any moral or professional dilemmas or questions that may rise in this situation.
-Discuss the available decisions or choices, and analyse them from ethical and professional viewpoints. -Advise on the best course of action, choice or conclusion for this scenario, and justify it.
Use external credible and scholarly resources to support your post
WIRTE YOURE citations and references
In: Computer Science
This week has focused on using several cost analysis tools to determine how well products contribute to a company’s profitability. However, all of these tools are internally used and not required to be published outside of an organization. Instead, external stakeholders rely on the three key financial statements reviewed in Unit 1:
If a company’s CVP analyses showed it was not operating at break-even, where on the financial statements might one be able to see this impact (i.e., specific line items on the statements)?
As portfolio activities are to be self-reflective, please make sure to connect the portfolio assignment to:
The Portfolio Activity entry should be a minimum of 500 words and not more than 750 words. Use APA citations and references if you use ideas from the readings or other sources.
In: Accounting
Locate a scholarly article in a psychology journal that utilizes a hypothesis or research question. Use e-library resources attached in course materials and document PSY380-LibraryResources, if you need help finding an article. You will answer each question below with full complete sentences using solid academic writing. Use in-text citations when needed. A reference page with all resources listed using APA formatting is expected.
Respond to the following questions about your scholarly article. You may answer the questions directly in this document or you may complete the assignment on a separate document.
In: Statistics and Probability
The purpose of the financial management is to maximize shareholders wealth. What is the meaning of shareholders wealth maximization? If a company attempts to maximize its shareholders wealth, is this good or bad for society? Explain by providing some examples. Do you think maximizing shareholders’ wealth also applies in Saudi Arabia?
Search the SEU library or the Internet for an academic or industry-related article. Select an article that relates to these concepts and explain how it relates to doing business in Saudi Arabia.
For your discussion post, your first step is to summarize the article in two paragraphs, describing what you think are the most important points made by the authors (remember to use citations where appropriate). For the second step, include the reference listing with a hyperlink to the article. Do not copy the article into your post and limit your summary to two paragraphs. Let your instructor know if you have any questions and enjoy your search.
In: Finance
Based on your reading and analysis of the case study, post your response to the following:
What challenges does Brown, the CIO, face in creating a process-oriented organization?
What are the requirements for creating a process-oriented culture in an organization? To what extend does Pinnacle West address these requirements? Where is it lacking?
Is it necessary to push the process-oriented culture to the entire company, or is having a process-oriented information technology organization sufficient for driving value from business information systems?
What lessons can you learn from the Pinnacle West case, and how might you apply those at your organization? How effective is management at promoting a process-oriented culture? What could management do better or improve upon to create or implement enterprise-wide business information systems? Provide specific examples to support your observations.
Please be specific, and use citations and references as appropriate and necessary
In: Operations Management
Research Prime Company has been expanding rapidly and is now an extremely diversified company for its size. It currently owns three companies with manufacturing facilities, two companies primarily in retail sales, a consumer finance company, and two natural gas pipeline companies. This has led to some conflict between the company’s chief accountant and its treasurer. The treasurer advocates presenting no more than five assets and three liabilities on its balance sheet. The chief accountant has resisted combining balances from substantially different subsidiaries and has asked for your assistance.
Research the Accounting Standards Codification to see what guidance is provided and prepare a memo to the chief accountant with your findings. Include citations to and quotations from the most relevant references. Include in your memo at least two examples of situations in which it may be inappropriate to combine similar-appearing accounts of two subsidiaries.
In: Accounting