Questions
Write a function that takes a string as an argument checks whether it is a palindrome....

Write a function that takes a string as an argument checks whether it is a palindrome. A palindrome is a word that is the same spelt forwards or backwards. Use similar naming style e.g. name_pal. E.g. If we call the function as abc_pal(‘jason’) we should get FALSE and if we call it a abc_pal(‘pop’) we should get TRUE.

Hint: define your function as abc_pal(str). This indicates that string will be passed. Next create two empty lists L1=[] and L2=[] . Also create counter and set it to zero (e.g. i = 0). Now use a while loop e.g. while i < len(str) and use the append method to fill both empty lists i.e. List1.append(str[i]] and for list2 you need to reverse the order of filling i.e. L2 will be filled from the last letter to the first letter of the argument string. Lastly check if L1 is equal to L2 if the string is an anagram, simply use return L1==L2 this will return TRUE or FALSE as the case may be.

NB: Please use spider in anaconda(python) and include a picture of the code

In: Computer Science

HOW CAN I USE a string instead of array tries and res on this assignment, with...

HOW CAN I USE a string instead of array tries and res on this assignment, with out impacting the program or modifying too much on conditions  check code bellow

import java.util.Scanner;
import java.util.Random;//starter code provided
public class inputLap
{
public static char roller;
public static String playerName;
public static int printed=0;
public static int rounds=8,lives=0,randy;
public static int tries[]=new int[4];//use arrays to store number of tries in each life
public static int res[]=new int[4];
public static String getName(String aString){
Scanner sc= new Scanner(System.in);
System.out.println("enter player's Name:");aString=sc.next();
playerName=aString;
return playerName;
}

public static void menu()
{
Scanner sc= new Scanner(System.in);

if(lives<=4){
System.out.println("Do you want to continue?(y/Y):\n (x/X) to exit. ");roller=sc.next().charAt(0);
}
}

public static int getGame() {
Scanner sc = new Scanner(System.in);
System.out.println("make a guess from 1-20");
int Guessed = sc.nextInt();
return Guessed;
}

public static void main(String[] args) {
String name=getName(playerName);
Random r = new Random();
int answer=0;
int f=0;
while(true) {
randy=r.nextInt(20);
for (int i=0;i<=7;i++)
{
answer=getGame();
rounds--;
if(answer==randy)
{
lives++;
System.out.println("congratulation you are right");
tries[lives-1]=8-rounds;
res[lives-1]=1;
rounds=8;
break;
}
else
{
System.out.println("you have "+(rounds)+" remaining");

}
if(rounds==0){
if(lives!=4){
tries[lives]=8;
lives++;
  
System.out.println("hard luck\nyou have "+(4-lives)+" lives left");
f=1;
}
  
}
if(f==1){
f=0;
break;
}

}

menu();

switch( roller)

{

case 'y':

case 'Y':rounds=8;break;

case'x':

case 'X':

lives=5;
System.out.println("Game No Game 1 Game 2 Game 3 Game 4");
System.out.print("Number of tries ");
printed=1;
for(int i=0;i<4;i++)
System.out.print(tries[i]+" ");
System.out.println();
System.out.print("Result \t");
for(int i=0;i<4;i++){
if(res[i]==1)
System.out.print("Success ");
else
System.out.print("Fail");
}
System.out.println("\nbye bye "+playerName+" !!");

break;

}

if(lives>4)
break;
}

if(printed!=1){
System.out.println("Game No Game 1 Game 2 Game 3 Game 4");
System.out.print("Number of tries ");
for(int i=0;i<4;i++)
System.out.print(tries[i]+" ");
System.out.println();
System.out.print("Result\t");
for(int i=0;i<4;i++){
if(res[i]==1)
System.out.print("Success ");
else
System.out.print("Fail");
}
System.out.println("\nbye bye "+playerName+" !!");

}

}

}

In: Computer Science

What are two areas that you believe are primary contributors to the '08-'09 financial crisis for...

What are two areas that you believe are primary contributors to the '08-'09 financial crisis for both the US and Iceland? Hello! Please help explain the two areas from an economic standpoint (preferably Macro but anything will do).

In: Economics

1. The labor demand curve tells us A. the marginal product created by an additional worker...

1. The labor demand curve tells us

A. the marginal product created by an additional worker times the wage.

B. the marginal revenue created by an additional worker.

C. how many workers the firm will want to hire, given the wage.

E. the marginal profit generated by an additional worker.

2. Third-party payers for medical care include all of the following EXCEPT:

a. employer-provided medical insurance.

b. Medicare

c. payments from the patient's savings

d. Medicaid

3. An employer retirement plan that provides a predetermined monthly amount of income when you retire is called a

A. Social Security plan.

B. 401(k) plan.

C. defined contribution plan.

D. defined benefit plan.

In: Economics

Write Speech to inform about STRESS AND ITS EFFECTS. Speech to Inform or Persuade I. Introduction...

Write Speech to inform about STRESS AND ITS EFFECTS.

Speech to Inform or Persuade

I.

Introduction

A. Attention Getter

B. Thesis

C. Preview of Main Points

Transition:

II.

Body

A. Main Point 1

a. Sub point 1

i. Sub-sub point 1

b. Sub point 2

i. Sub-sub point 2

Transition:

B. Main Point 2

a. Sub point 1

i. Sub-sub point 1

b. Sub point 2

i. Sub-sub point 2

Transition:

C. Main Point 3

a. Sub point 1

i. Sub-sub point 1

b. Sub point 2

i. Sub-sub point 2

Transition:

III.

Conclusion

A. Review

B. Thesis

C. Attention Getter Tie-back

In: Psychology

You are tasked with opening a new factory for your business in another country. You speak...

You are tasked with opening a new factory for your business in another country. You speak the language and have spent some time living abroad so you are confident in your ability to work in anther culture. You are a skilled technical manager and believe you have a good team (mixed expatriates and local managers and employees). However, shortly after starting your project you realize that some things are not getting done - some of the contractors are slow to respond or slow to deliver. As you ponder this and get further behind schedule, one of your managers approaches you with a suggestion, namely: the contractors are expecting to be paid something under the table due to the high local tax rates. If they are not paid at least part of their money that way, they will continue to be slow in delivering goods and services.

What do you do?

In: Economics

Warnerwoods Company uses a perpetual inventory system. It entered into the following purchases and sales transactions...

Warnerwoods Company uses a perpetual inventory system. It entered into the following purchases and sales transactions for March.

Date Activities Units Acquired at Cost Units Sold at Retail
Mar. 1 Beginning inventory 160 units @ $52.20 per unit
Mar. 5 Purchase 255 units @ $57.20 per unit
Mar. 9 Sales 320 units @ $87.20 per unit
Mar. 18 Purchase 115 units @ $62.20 per unit
Mar. 25 Purchase 210 units @ $64.20 per unit
Mar. 29 Sales 190 units @ $97.20 per unit
Totals 740 units 510 units

Compute the cost assigned to ending inventory using LIFO.

Perpetual LIFO:
Goods Purchased Cost of Goods Sold Inventory Balance
Date # of units Cost per unit # of units sold Cost per unit Cost of Goods Sold # of units Cost per unit Inventory Balance
March 1 160 @ $52.20 = $8,352.00
March 5
March 9
March 18
March 25
March 29
Totals $0.00


In: Accounting

Silver Company makes a product that is very popular as a Mother’s Day gift. Thus, peak...

Silver Company makes a product that is very popular as a Mother’s Day gift. Thus, peak sales occur in May of each year, as shown in the company’s sales budget for the second quarter given below:

April May June Total
Budgeted sales (all on account) $480,000 $680,000 $260,000 $1,420,000

From past experience, the company has learned that 30% of a month’s sales are collected in the month of sale, another 60% are collected in the month following sale, and the remaining 10% are collected in the second month following sale. Bad debts are negligible and can be ignored. February sales totaled $410,000, and March sales totaled $440,000.

Required:

1. Prepare a schedule of expected cash collections from sales, by month and in total, for the second quarter.

2. What is the accounts receivable balance on June 30th?

In: Accounting

he direct labor budget of Yuvwell Corporation for the upcoming fiscal year contains the following details...

he direct labor budget of Yuvwell Corporation for the upcoming fiscal year contains the following details concerning budgeted direct labor-hours:

1st Quarter 2nd Quarter 3rd Quarter 4th Quarter
Budgeted direct labor-hours 11,200 9,800 10,100 10,900

The company uses direct labor-hours as its overhead allocation base. The variable portion of its predetermined manufacturing overhead rate is $6.00 per direct labor-hour and its total fixed manufacturing overhead is $80,000 per quarter. The only noncash item included in fixed manufacturing overhead is depreciation, which is $20,000 per quarter.

Required:

1. Prepare the company’s manufacturing overhead budget for the upcoming fiscal year.

2. Compute the company’s predetermined overhead rate (including both variable and fixed manufacturing overhead) for the upcoming fiscal year.

In: Accounting

Balance the following oxidation-reduction reactions, and show ALL steps: 1. MnO4- + Cl- <--> Mn2+ +...

Balance the following oxidation-reduction reactions, and show ALL steps:

1. MnO4- + Cl- <--> Mn2+ + Cl2

2. As2S3 + NO3- <--> HAsO3 + S + NO

Balance the ffollowing redox reactions and show ALL steps:

1. Fe3S4 + O2(g) <--> Fe(OH)3(s) + SO42-

2. FeS2(s) + NP3- <--> N2(g) + FeOOH(s) + SO42-

In: Chemistry

After watching the Video " A Class Divided" on March 26, 1985 "SEASON 1985: EPISODE 9"...

After watching the Video " A Class Divided" on March 26, 1985 "SEASON 1985: EPISODE 9" on FrontLine Website.

1. Explain briefly about how “race” was socially constructed in this film. How do you see racism and the system of oppression operating in this film? Identify instances of stereotypes, prejudice, discrimination, oppression, and internalized oppression. What are some of the consequences (Thomas Principle) of “racism” in the film?

Answer each part of the Question 1 in 200-300 words only.

In: Psychology

11.7. Machine speed. The number of defective items produced by a machine (Y) is known to...

11.7. Machine speed. The number of defective items produced by a machine (Y) is known to be linearly related to the speed setting of the machine (X). The data below were collected from recent quality control records. #d. Estimate the variance function by regressing the squared residuals against-X, and then calculate the estimated weight for each case using (11.16b). #e. Using the estimated weights, obtain the weighted least squares estimates of f30 and th. Are the weighted least squares estimates similar to the ones obtained with ordinary least squares in part (a)? #f. Compare the estimated standard deviations of the weighted least squares estimates bwo and bW1 in part (e) with those for the ordinary least squares estimates in part (a). What do you find? #g. Iterate the steps in parts (d) and (e) one more time. Is there a substantial change in the estimated regression coefficients? If so, what should you do?

   28.0 200.0
   75.0 400.0
   37.0 300.0
   53.0 400.0
   22.0 200.0
   58.0 300.0
   40.0 300.0
   96.0 400.0
   46.0 200.0
   52.0 400.0
   30.0 200.0
   69.0 300.0

In: Math

Prepare an essay in response to discuss the meaning or implications of using new technology to...

Prepare an essay in response to discuss the meaning or implications of using new technology to understand and impact consumer.

In: Economics

ads displayed on the boards of the Red Wings hockey games often just show a brand's...

  • ads displayed on the boards of the Red Wings hockey games often just show a brand's name and nothing else. Fans often don't understand the purpose of this simplistic marketing strategy; however advertisers understand the subtle influence of:

    • Reminder advertising

    • Informative advertising

    • Comparative advertising

    • Perpetual advertising

  • Search engine 'crawlers' rank websites on multiple categories using complex and dynamic algorithms. Which of the following would most likely not be an example of a ranking category?

    • Traffic to the website

    • Relevance of keyboards in the content of the website

    • Age of the website

    • Amount of TV advertising spent on promoting the website

  • Bayer Aspirin and CVS Aspirin both have the same dosage, directions and active ingredient. Despite their similarity, Bayer costs nearly five times as much. In this case, Bayer Aspirin is known as a _____ brand.

    • Private

    • Value-added

    • Store

    • National

  • Ads emphasizing the fearful consequences of texting and driving use _____ appeals in their message content.

    • Emotional

    • Rational

    • Reach

    • Frequency

  • Which of the following profit characteristics represents the introduction stage of the product lifecycle for an e-reader?

    • Negative profits

    • High profits

    • Rising profits

    • Declining profits

  • Which of the following is not an example of a line extension?

    • M&M’s Halloween colored chocolates

    • P&G selling six different brands of laundry detergent

    • Adidas running shoes for people with flat feet

    • The introduction of Coca-Cola’s New Coke beverage

  • On an infomercial for a bottle opener, the spokesperson urges customers to call now before the product runs out. Adopting this _____ principle persuasion, sales can increase.

    • Reciprocity

    • Liking

    • Scarcity

    • Authority

  • Covergirl intends to expose its new ad campaign to 55% of their target market during its first 6 months. To determine if they are successful in doing this, they will need to measure the campaign’s _____.

    • Reach

    • Push strategy

    • Media impact

    • Frequency

  • Segmented pricing occurs when a company sells a product at two or more prices. What else defines segmented pricing?

    • The difference in prices is based on the marketer’s emotional state.

    • The difference in prices is based solely on differences in costs

    • The difference in prices is not based on differences in costs

    • The difference in prices is based on the economic situation at the moment

  • _____ are paid links that emerge as search results when specific keywords are entered on search engines.

    • Organic listings

    • Sponsored links

    • Search engine links

    • Google listings

  • Many middle-class consumers want to purchase high quality products but cannot afford them. Marketers understand this demand and find ways to offer high quality products with a _____ value proposition.

    • More-for-more

    • More-for-the-same

    • Less-for-much-less

    • Same-for-more

  • The Dollar Shave Club sells razors and other shaving products to consumers all over the world. Which of the following would be considered part of the augmented product for Dollar Shave Club?

    • Their unique packaging

    • The quality level of their razors

    • The Dollar Shave Club brand name

    • Warranty offered on their products

  • Tinder is an app that helps people fall madly in love with each other. While it offers its service for free, love-seekers can choose to pay a monthly fee which gives them access to a larger assortment of potential mates. What type of pricing strategy does this represent?

    • Cost-based pricing

    • Value-added pricing

    • Good-value pricing

    • Competition-based pricing

  • Which of the following best describes a marketer’s strategy when engaging in market penetration pricing?

    • Setting a low price to attract a large number of buyers

    • Setting a low price to attract a large number of competitors

    • Setting a high price to attract a large market share

    • Setting a high price to skim maximum revenues from buyers

  • Owners of B-Sharp, a store that sells musical instruments, adopt _____ segmentation when targeting consumers based on their musical lifestyle.

    • Geographic

    • Demographic

    • Psychographic

    • Concentrated

In: Operations Management

VanderMeer Inc. reported the following information for the month of February: Inventory, February 1 57 units...

VanderMeer Inc. reported the following information for the month of February:

Inventory, February 1 57 units @ $20
Purchase:
February 7 48 units @ $22
February 18 67 units @ $24
February 27 38 units @ $26

During February, VanderMeer sold 136 units. The company uses a periodic inventory system.

Required:

What is the value of ending inventory and cost of goods sold for February under the following assumptions.

Assumption Cost of Goods Sold Ending Inventory
1. Of the 136 units sold, 48 cost $20, 34 cost $22, 50 cost $24, and 4 cost $26. $ $
2. FIFO $ $
3. LIFO $ $
4. Weighted average method (Round average unit cost to the nearest cent,
and round all other calculations and your final answers to the nearest dollar.)
$ $

In: Accounting