Write a function check_palindrome that takes a string as an input and within that function determines whether the input string is a palindrome or not (a word or phrase that is read the same forward as it is backward - i.e. kayak, dad, etc.). If it is a palindrome, return 'Hey! That's a palindrome!' If it is not a palindrome, return 'Bummer. Not a palindrome.' Remember that you created a function that can reverse a string above.

Answers

Answer 1

Answer:

The function in Python is as follows:

def check_palindrome(strn):

   retstr = "Bummer. Not a palindrome."

   if strn[len(strn)::-1] ==strn:

       retstr = "Hey! That's a palindrome!"

       

   return retstr

Explanation:

This defines the function

def check_palindrome(strn):

This sets the return string to not a palindrome

   retstr = "Bummer. Not a palindrome."

This checks if the original string and the reversed string are the same

   if strn[len(strn)::-1] ==strn:

If yes, the return string is set to palindrome

       retstr = "Hey! That's a palindrome!"

This returns the expected string

   return retstr

The function to reverse the string is not given; and the programming language. So, I solve the question without considering any function


Related Questions

Implement a class Rectangle. Provide a constructor to construct a rectangle with a given width and height, member functions get_perimeter and get_area that compute the perimeter and area, and a member function void resize(double factor) that resizes the rectangle by multiplying the width and height by the given factor. (Page EX9-3).

Answers

Answer:

//class declaration

public class Rectangle{

   

   //declare the instance variables - width and height

   double width;

   double height;

   

   

   //the constructor

  public Rectangle(double width, double height){

       

       //initialize the width of the rectangle

       this.width = width;

       

       //initialize the height of the rectangle

      this.height = height;

       

   }

   

   

   //method get_perimeter to compute the perimeter of the rectangle

   public double get_perimeter(){

       

       //compute the perimeter

       //by using the formula 2(width + height)

      double perimeter = 2*(this.width + this.height);

       

       //return the perimeter

       return perimeter;

   }

   

   //method get_area to compute the area of the rectangle

   public double get_area(){

       

       //compute the area

       //by multiplying the width and height of the rectangle

       double area = this.width * this.height;

       

       //return the area

      return area;

   }

   

   

   //method resize to resize the rectangle

   public void resize(double factor){

       

       //resize the width of the rectangle

       //by multiplying the width by the factor

       this.width = this.width * factor;

       

       //resize the height of the rectangle

       //by multiplying the height by the factor

      this.height = this.height * factor;

     

   }

   

}  //end of class declaration

Explanation:

The code above has been written in Java. In contains comments explaining every part of the program.

Because travel distance, cost of living, and other factors vary among the three regions, the annual cost of having a salesperson is $5000 in the east, $11000 in the Midwest, and $7000 in the west. The company has 700000 budgeted for expenses. To ensure nationwide exposure for its product, the company has decided that each region must have at least 10 salespeople. The company wants to know how many salespeople to allocate to each region to maximize the total number of products sold. What type of integer programming model it is

Answers

Answer:

Pure integer programming model

Explanation:

To know the type of integer model, we simply check the expected variable and/or value of the model.

From the question, we understand that the end result is to determine the number of salespeople that will be allocated to the east, midwest and west region.

The number of salespeople is discrete i.e. it is an integer (whole number). Since the result is purely integer, the type of model is Pure integer programming model

What will the declaration below do to its target?

animation-direction: reverse;
The animation steps will play backward.
The animation steps will play forward, then backward.
The animation steps will play forward.
The animation steps will play backward, then forward.

Answers

The animation steps will play forward then backward

Select the correct answer.
What is the advantage of using transparencies?
O A. They support better image quality than online presentations.
O B. They are helpful when creating non-linear presentations.
OC. They allow the presenter to jot down points on the slide.
OD. They are better suited to creating handouts.
Reset
Next

Answers

Answer:

They are better suited to creating handouts

Ilang takudtod ba isang saknong​

Answers

Answer:

?

Explanation:

Write the recursive method printNumber. The public static method named printNumber takes two parameters. The first parameter is an integer array called nums, and the second is parameter is an even int called index. The return value is an integer that is the product of the even index values in nums whose index is less than or equal to index. Assume that the array nums has length >

Answers

Answer:

The function is as follows:

public static void printNumber(int nums[],int index){

if (index < 0) {

 System.out.print(nums[0]);

 return;  }

if (index % 2 == 0){

    if(index!=0){

 nums[index-2]*=nums[index];}  }

printNumber(nums, index - 1);

}

Explanation:

To do this, we need to save the required product in the 0 index element of the array.

This defines the function

public static void printNumber(int nums[],int index){

If the index variable < 0,

if (index < 0) {

Print the 0 index as the product [i.e. the calculated product]

 System.out.print(nums[0]);

This ends the recursion

 return;  }

If the current array index is even

if (index % 2 == 0){

Check if index is not 0

    if(index!=0){

If both conditions are valid, calculate the product and save the result in index - 2 element. The final result is then saved in the 0 index

 nums[index-2]*=nums[index];}  }

Call the function while the base case has not been executed

printNumber(nums, index - 1);

}

What does the top-level domain in a URL indicate?
A. the organization or company that owns the website
B. the organization or company that operates the website
C. the protocol used to access the website D. the type of website the URL points to

Answers

Answer:

b i think

Explanation:

A top-level domain (TLD) is the last segment of the domain name. The TLD is the letters immediately following the final dot in an Internet address. A TLD identifies something about the website associated with it, such as its purpose, the organization that owns it or the geographical area where it originates.

Answer:

The answer is D. The type of website the URL points to.

Explanation:

I got it right on the Edmentum test.

Powerpoint can use existing documents of
A. Word
B. Excel
C. Access
D. All of the Above

Answers

Your answer is:



Your answer is B

You are writing a device driver for an audio device connected to your computer. Your code needs to determine if the device is busy or ready to accept a new command. How can the driver determine this

Answers

Answer: hello the options related to your question is missing attached below is the complete question and options

answer : Read the status register ( A )

Explanation:

To determine if the device is busy or ready to accept a new command the line of action is to write a code that will Read the status register. A status register   is a hardware register which contains the information about the processor of the device ( i.e. whether the processor is busy or ready )

what is polymerization1​

Answers

Answer:

Polymerization, any process in which relatively small molecules, called monomers, combine chemically to produce a very large chainlike or network molecule, called a polymer. The monomer molecules may be all alike, or they may represent two, three, or more different compounds.

please give me brainliest~❤︎ت︎

Question # 2 Multiple Select You wrote a program to compare the portion of drivers who were on the phone. Which statements are true? Select 4 options. Even when confident that the mathematical calculations are correct, you still need to be careful about how you interpret the results. Your program compared an equal number of male and female drivers. You could modify the program to allow the user to enter the data. It is important to test your program with a small enough set of data that you can know what the result should be. A different set of observations might result in a larger portion of male drivers being on the phone.

Answers

Answer: A different set of observations might result in a larger portion of male drivers being on the phone.

You could modify the program to allow the user to enter the data.

Even when confident that the mathematical calculations are correct, you still need to be careful about how you interpret the results.

It is important to test your program with a small enough set of data that you can know what the result should be.

Explanation: Got it right

In which situation is coauthoring of presentations primarily utilized?

A) A reviewer must be able to make changes to a presentation after an author creates it.

B) Multiple authors must be able to simultaneously make changes to a presentation.

C) Multiple reviewers have to be able to view one another's changes after they are made.

D) One author and one reviewer work on a presentation at different times.

Answers

Answer:

C) Multiple reviewers have to be able to view one another's changes after they are made.

Explanation:

i cant tell if tubbo is a bee or a goat
or could he be human in the smp

Answers

Answer:

Tubbo is a goat or ram on the Dream SMP.

Explanation:

Since Jschlatt was his father and he's a ram, Tubbo is a ram.

Answer:

yes, the first person`s answer is correct! On the dsmp, Tubbo is a goat, since is father was one as well. The only place he is a bee is the osmp, or Origins smp. when Tubbo first joined the dsmp, he was known for his obsession with bees, which carried into his reputation entirely.

:]

Consider the following sequence of page references: 1 2 3 3 4 4 1 4 1 3 4. Determine how many page faults will occur with LRU(Least Recently Used) for each of the following algorithms, assuming there are only 2 physical page frames and that both are initially empty.

Answers

Answer:

7 page faults

Explanation:

I have created a small Java program that can be seen in the attached picture below. This Java program uses an LRU algorithm in order to find the number of page faults within an array of page references from the references given in the question. Using these references, and the java program we can see that there are a total of 7 page faults. This can be seen in the output highlighted by red in the picture below.

How have technology and social media changed reading?
O A. Physical books can only be read on the web.
B. Now reading is a conversation of give and take.
O C. People no longer have to read anything at all.
D. Reading often takes much longer to undergo.

Answers

Answer:

B?

Explanation:

I'm super sorry if I get this wrong for you but after thinking so much I probably think it would be B

Answer:

the guy above is right it is B

Explanation:

because 2+2=4

Which of the following tools helps ensure your document will open in older versions of word

Answers

Answer:

Compatibility Check

Explanation:

Select File > Info.

In the Inspect Document section, select Check for Issues > Check Compatibility.

Click Select versions to show. A check mark that appears next to the name of the mode that the document is in.

Write a program that will create an array of random numbers and output the values. Then output the values in the array backwards. SPECIFICATIONS: File name: ArrayBackwards.java Your program must make use of at least one method other than main()to receive full credit (methods can have a return type of void). Suggestion: create and populate the array in the main() method. Make a method for Step 3 below and send in the array as a parameter. Make another method for Step 4 and send in the array as a parameter.

Answers

Answer:

The program is as follows:

import java.util.*;

public class Main{

public static void backward(int [] Rndarray, int lnt){

    System.out.print("Reversed: ");

    for(int itm = lnt-1;itm>=0;itm--){

        System.out.print(Rndarray[itm]+" ");     } }

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int lnt = input.nextInt();

 Random rd = new Random();

 int [] Rndarray = new int[lnt];

 for (int itm = 0; itm < lnt; itm++) {

        Rndarray[itm] = rd.nextInt();

        System.out.print(Rndarray[itm]+" ");

     }

     System.out.println();

 backward(Rndarray,lnt); }}

Explanation:

This defines the backward() method

public static void backward(int [] Rndarray, int lnt){

This prints string "Reversed"

    System.out.print("Reversed: ");

This iterates through the array

    for(int itm = lnt-1;itm>=0;itm--){

Each element is then printed, backwards

        System.out.print(Rndarray[itm]+" ");     } }

The main begins here

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

This gets the array length

int  n = input.nextInt();

This creates a Random object

Random rd = new Random();

This declares the array

 int [] Rndarray = new int[lnt];

This iterates through the array for input

 for (int itm = 0; itm < lnt; itm++) {

This generates a random number for each array element

        Rndarray[itm] = rd.nextInt();

This prints the generates number

        System.out.print(Rndarray[itm]+" ");

     }

This prints a new line

     System.out.println();

This passes the array and the length to backward() method

 backward(Rndarray,lnt); }}

Sixteen stations, numbered 1 through 16, are contending for the use of a shared channel by using the adaptive tree walk protocol. If all the stations whose addresses are prime numbers suddenly become ready at once, how many bit slots are needed to resolve the contention

Answers

Answer:

11 bit slot will be needed

Explanation:

The number of prime numbers between 1 through 16

= 2, 3 , 5, 7, 11 and 13

hence we can say 6 stations are to use the shared channel

Given that all the stations are ready simultaneously

The number of bit slots that will be needed to handle the contention will be 11 bits :

slot 1 : 2, 3, 5 , 7, 11 , 13

slot 2 : 2,3, 5, 7

slot 3 : 2, 3

slot 4 : 2 .   slot 5 : 3 .  slot 6 : 5,7.   slot 7 : 5 .   slot 8 : 7.  slot 9: 11,13.  

slot 10 : 11.   slot 11 : 13

g Consider a disk queue with requests for I/O to blocks on cylinders 95, 120, 41, 122, 15, 142, 65, 167. The Shortest Seek Time First (SSTF) scheduling algorithm is used. The head is initially at cylinder number 100. The cylinders are numbered from 0 (center of disk) to 199 (edge of disk). a) List the requests in the order in which they will be serviced. b) What is the total head movement (in number of cylinders) incurred while servicing these requests

Answers

Answer:

follows are the solution to the given question:

Explanation:

Please find the image file for the SSTF scheduling algorithm.

Following are the requested order:

[tex]Request \ \ order :\\\\95\\120\\122\\142\\167\\65\\ 41\\15[/tex]

Calculating the Total Head Movement:

[tex]= (100-95) + (120-95) + (122-120) + (142-122) + (167-142) + (167-65) + (65-41) + (41-15)\\\\= 5 + 25 + 2 + 20 + 25 + 102 + 24 + 26\\\\= 229[/tex]

What is the benefit of using WYSIWYG editor

Answers

A WYSIWYG editor is a program with a rich text editing interface that allows your users to see what the end result will look like (more or less) while they're typing. Without one, users would have to edit raw HTML, which can get in the way of the writing process, to say the least.

Hope it helps! :)

Which of the following statements is correct?

Select one:

a. A failure in Network layer crashes the application

b. A failure in Network layer affects transport layer

c. A failure in Network layer affects Data Link layer

d. A failure in Network layer affects entire communication

e. A failure in Network layer stops the device from working entirely​

Answers

C is the best answer

The statement which is correct from the given answer choices is:

C. A failure in Network layer affects Data Link layer

According to the given question, we are asked to show which of the statement about the network layer is most represented accurately.

As a result of this, we can see that a network layer is a part of the OSI model which is in charge of receiving and forwarding service requests from the sender to the receiving host in a network.

With  this in mind, if the network layer fails, then there would also be a failure in the data link layer.

Therefore, the correct answer is option C

Read more here:

https://brainly.com/question/21298343

(2) What are the limitations of portable computer? ​

Answers

Answer:

Most portable computer are not upgradable and they have a lower specification than most desktop systems

what is a web browser​

Answers

Answer:

web browser

Explanation:

.........;)

What are the objects in object-oriented programming language?

Answers

Answer:

An object is an abstract data type with the addition of polymorphism and inheritance. Rather than structure programs as code and data, an object-oriented system integrates the two using the concept of an "object". An object has state (data) and behavior (code). Objects can correspond to things found in the real world.

hope it helps ya mate.

Which best describes the condition under which the Unicode output is the same as plain text?

when the text contains no punctuation

when the text contains only characters that are part of Unicode

when the text contains only characters that are part of ASCII

when the text contains no numbers

Answers

Answer:

the answer is c

Explanation:

when the text contains only characters that are part of ASCII- on edge

HAGS

Answer:

when the text contains only characters that are part of ASCII

Explanation:

g 4-6 you've been given the network 200.5.0.0 /24 and need to subnet it using vlsm as follows: bldg 1 30 hosts bldg 2 10 hosts bldg 3 10 hosts bldg 4 4 hosts what will be the network address for bldg 3

Answers

Answer:

The answer is  "200.5.0.0 32/28".

Explanation:

The requirement of the Bldg is =30.

The number of the host bits which is needed = 5

Therefore the subnet mask will be =/27

for bldg 3 netmask could be= /28

and when the /28 after that the last octet will be= 00100000.

00100000 converting value into a decimal value that is = 32.

therefore the correct value is 200.5.0.32 /28.

PLEASE I NEED HELP, WILL MARK BRAINLYEST!!! 50 POINTS!!!
Select the correct answer.
Production teams share a script between them, and the script is a collaborative effort. Which action is important to keep its character intact?
A.
develop the structure of the screenplay
B.
mention the details of the genres and the subgenres
C.
develop the hook
D.
create a sales pitch

Answers

Answer: Develop the structure of the screenplay

Explanation:

The screenplay helps the team find the character of the film and develop it.

Answer: B.

mention the details of the genres and the subgenres

Explanation:

Right on test

Write a recursive method called printNumPattern() to output the following number pattern.Given a positive integer as input (Ex: 12), subtract another positive integer (Ex: 3) continuallyuntil 0 or a negative value is reached, and then continually add the second integer until therst integer is again reached. For this lab, do not end output with a newline.

Answers

Answer:

Explanation:

The following is written in Java and prints out the pattern to and from the first num parameter that is passed to the function. Meaning it goes from num1 to 0 and then from 0 to num1 again. It prints all of the values in a single line seperated by a space and a test case was used using the values provided in the question. The output can be seen in the attached picture below.

static void printNumPattern(int n1,int n2){

       System.out.print(n1 + " ");

       if(n1<=0) {

           return;

       } else {

           printNumPattern(n1-n2,n2);

       }

       System.out.print(n1 + " ");

   }

All of the following can cause a fatal execution-time error except: Group of answer choices Dereferencing a pointer that has not been initialized properly Dereferencing a null pointer Dereferencing a pointer that has not been assigned to point to a specific address Dereferencing a variable that is not a pointer

Answers

Answer: Dereferencing a variable that is not a pointer

Explanation:

The execution time also refered to as the CPU time pertaining to a given task is the time that is used by the system to execute a task.

Some of the reasons for a fatal execution-time error include:

• Dereferencing a pointer that has not been initialized properly

• Dereferencing a null pointer

• Dereferencing a pointer that has not been assigned to point to a specific address.

It should be noted that dereferencing a variable that is not a pointer doesn't cause a fatal execution-time error.

To launch the mail merge help dialog box, what option should you select using the Microsoft word office assistant?​

Answers

Answer:

Complete setup.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users type, format and save text-based documents.

A Mail Merge is a Microsoft Word feature that avails end users the ability to import data from other Microsoft applications such as Microsoft Access and Excel. Thus, an end user can use Mail Merge to create multiple documents (personalized letters and e-mails) for each entry in the list at once and send to all individuals in a database query or table.

Hence, Mail Merge is a Microsoft Word feature that avails users the ability to insert fields from a Microsoft Access database into multiple copies of a Word document.

Some of the options available in the Write & Insert Fields group of Mail Merge are;

I. Highlight Merge Fields.

II. Address Block.

III. Greeting Line.

Generally, when a user wants to launch the Mail Merge help dialog box, the option he or she should select using the Microsoft word office assistant is complete setup.

Additionally, the sequential steps of what occurs during the mail merge process are;

1. You should create the main document

2. Next, you connect to a data source

3. You should highlight or specify which records to include in the mail.

4. You should insert merge fields.

5. Lastly, preview, print, or email the document.

Other Questions
A loss due to a discontinued operation should be reported on the income statement a.as an operating expense b.without related tax effect c.above income from continuing operations d.below income from continuing operations Revenue is:A. The amount of money a company makes from sales.B. The amount of money a company pays its employees.C. The amount of taxes a company has to pay.D. The amount of money a company has left over after paying bills. Sasha sold "c" corndogs for $4 each and "p" bags of popcorn for $3. Sashamade a total of $500. Write the equation that represents this situation. whats the process of the inflammatory response in the lungs? Write the degree of the polynomial 2y 13y11 Homework problem #7: 24567389+35432611=what there is soo much regrouping, could someone show me how to do it? Which linear equation has no solutions?O A. 7x+x+4 = 2 (4x + 2)B. 3 (3x + 1) = 8x+xO C. 10x + 8 = 5x + 8D. 5x + 15 = x - x If a roof is 30ft 4 in wide & 52 ft 9 in long with 3 inches of water trapped on the roof. how many gallons are trapped on the roof? 1. The amount of money that is invested in a house is called? Based on the graph, how many miles of railroad tracks did the North havein 1850?A. 200C. 2,000D. 7,000B. 700 When multiplying fractions do you multiple it like this: 5/6 7/8 35/48 and if you are multiplying fractions with the same denominator do you multiply like this: 5/8 6/8= 30/8 or do I solve it like this: 9/103/10= 27/100? I am very confused please help. During the latest month, the company purchased and used 58,000 pounds of direct materials at a price of $1.00 per pound to produce 10,000 units of output. Direct labor costs for the month totaled $56,350 based on 4,900 direct labor hours worked. Variable manufacturing overhead costs incurred totaled $15,000 and fixed manufacturing overhead incurred was $10,400. Based on this information, the direct materials price variance for the month was: Coins are generally weighted so that when you flip one, an outcome of heads and an outcomeof tails are equally likely.(a). If you flip a coin three times, what are the possible results? One is HHH (that is, three headsin a row). Another is HTH (heads, then tails, then heads). Write down all the possibilities.(b). Including my examples, how many possible outcomes are there?(c). When you flip a coin three times, what is the probability that youll get tails exactly twice?(d). When you flip a coin three times, what is the probability that youll get at least one heads? Brainly + extra points for the correct answerIs it possible to have both Reactive Attachment Disorder and Dependent Personality Disorder? PLS HELP IM VERY CONFUSED LOL 50 POINTSWhat is the correct reason for statement 3? simply 3x to the power of 2 of over 9x to the power of 5 Someone help me with 10-15 ASAP please SOMEONE PLEASE HELP !! Write the ratio as a fraction in simplest form: 7/4 inches to 3/4 inch