1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jarptica [38.1K]
2 years ago
10

A palindrome is a string whose reversal is identical to the string. how many bit string of length 20 are palindromes and do not

contain 11 as a substring?
Computers and Technology
1 answer:
zepelin [54]2 years ago
7 0

There are 2n possible bit strings for any n.

<h3>What makes something a palindrome?</h3>
  • The way they read both forward and backward is the same.
  • A palindrome is a word, phrase, or sentence that reads the same both forward and backward.
  • Palindrome is a combination of the Greek words for "again" (Palin) and "to run" (drom).
  • A palindromic number, sometimes referred to as a numeral palindrome or a numeric palindrome, is one whose value does not change when its digits are flipped, for example, 16461.
  • The single palindrome date in the M/DD/YYYY date format in 2022 is February 20, 2022. (2-20-2022)

To learn more about palindrome, refer to:

brainly.com/question/28279486

#SPJ4

You might be interested in
An algorithm is a ________. a. simple thinking strategy for making decisions quickly and efficiently. b. testing method involvin
Vsevolod [243]

Answer:

d. methodical step-by-step procedure for solving problems.

Explanation:

It is a set of instructions or a step-by-step methodological approach or process that helps solve simple or complex problems. Let’s say you want to count the number of people in a hall. You can count them one at a time with your finger and count from 1. You can express this algorithm of counting the number of people in that hall in form of a mathematical or computer pseudo code.

6 0
3 years ago
A stepping function allows a program
vichka [17]

Answer:

To be inspected line by line.

Explanation:

8 0
4 years ago
Read 2 more answers
Write a loop that reads positive integers from console input, printing out those values that are even, separating them with spac
zvonat [6]

Hello, since you did not specify a programming language, I wrote this algorithm in C++. Good luck!

<h2>Code:</h2>

#include <iostream>

#include <vector>

std::vector<int> v;

int main(int argc, char* argv[]) {

   while(1) {

   int temp;

   std::cout << "\nEnter a number: ";std::cin>>temp;

   

   if(temp<0) {

       std::cout << "\nEven number(s) is/are:\n---------------------\n";

       for(int i=0;i<v.size();i++) {

           if(v.at(i)%2==0) std::cout << v[i] << " ";

           else continue;

       }

       std::cout << std::endl;

       break;

   }else {

       v.push_back(temp);

   }

}

   return 0;

}

4 0
2 years ago
Define a function begins_with_line that consumes a string and returns a boolean indicating whether the string begins with a dash
Ksju [112]

Answer:

The program written in python is as follows:

def begins_with_line(userinut):

     while userinut[0] == '-' or userinut[0] == '_':

           print(bool(True))

           break;

     else:

           print(bool(not True))

userinput = input("Enter a string: ")

begins_with_line(userinput)

Explanation:

The program makes use of no comments; However, the line by line explanation is as follows

This line defines the function begins_with_line with parameter userinut

def begins_with_line(userinut):

The following italicized lines checks if the first character of user input is dash (-) or underscore ( _)

<em>      while userinut[0] == '-' or userinut[0] == '_': </em>

<em>            print(bool(True))  </em><em>->The function returns True</em>

<em>            break; </em>

<em>However, the following italicized lines is executed if the first character of user input is neither dash (-) nor underscore ( _)</em>

<em>      else: </em>

<em>            print(bool(not True))  </em><em>-> This returns false</em>

The main starts here

The first line prompts user for input

userinput = input("Enter a string: ")

The next line calls the defined function

begins_with_line(userinput)

<u><em>NB: The program does not make use of if statement</em></u>

8 0
3 years ago
Binary Numbers and Conversion 1. Complete the following decimal-to-binary number conversions. a) 17 (10) b) 34 (10) c) 58 (10) d
GaryK [48]

Answer:

a) 10001

b)100010

c)111010

d)1111100

e)1110111

f)10110010

g)100101001

h)110011101

Explanation:

7 0
3 years ago
Other questions:
  • ____ repeatedly sends a cluster of three packets starting at the first router connected to a computer, then the next, and so on,
    12·1 answer
  • What is difference between RAM and ROM?
    13·1 answer
  • Your computer is slowing down because you’ve started a process that is taking most of the memory and CPU resources. Which of the
    7·1 answer
  • A windows host sends a tcp segment with source port number 1200 and destination port number 25. the sending host is a(n) _______
    10·1 answer
  • Disadvantage do you think one can have if he or she does use electronic media
    15·1 answer
  • Mike's boss told him he needs to be more efficient. Select each suggestion that will help him become more efficient at creating
    9·1 answer
  • The QWERTY keyboard is the most common layout of keys on a keyboard. <br> a. True<br> b. False
    8·2 answers
  • Create a method to search an un-ordered array of integers for a value, if the value is found return the index of its position in
    10·1 answer
  • Describe computer as a source of communication.​
    5·1 answer
  • From your analysis, do you think you’ve seen all of the servers and hosts that make up the Amazon e-commerce site? How does Amaz
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!