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
kogti [31]
3 years ago
12

7.12 LAB: Contains the character

Computers and Technology
2 answers:
My name is Ann [436]3 years ago
5 0

Answer:there is Java program and C++ program

Explanation:

nalin [4]3 years ago
5 0

Answer:

The solution code is written in Python 3

  1. input_char = input("Enter a character: ")
  2. sentence = input("Enter a sentence: ")
  3. word_list = sentence.split(" ")
  4. for word in word_list:
  5.    for c in word:
  6.        if(c == input_char):
  7.            print(word)
  8.            break  

Explanation:

Firstly, use the input function to get a input character and sentence from user (Line 1 - 2)

Next, use the split method to divide the sentence into a list of individual words using single space as the delimiter (Line 4).

Create an outer for loop to traverse each word in the word_list and create another inner loop to traverse each character in the word and check if there is any character match with the input character. If so print the word and terminate the inner loop and proceed to the next round of the outer loop.

After finishing the loop, all the relevant words will be printed.

You might be interested in
Professor Gig A. Byte needs to store text made up of the characters A with frequency 6, B with frequency 2, C with frequency 3,
Luden [163]

Answer:

This is not true

Explanation:

The optimal Huffman code is used to encrypt and compress text files. It uses fixed-length code or variable-length code for encryption and compression of data.

The professor's character code is similar to Huffman's variable-length coding which uses variable length od binary digits to represent the word strings. The file size of the text file above is;

= 6 x 1 + 2 x 2 + 3 x 2 + 2 x 2 + 8 x 1 = 28 bits

This would be the same for both cases.

The encrypt would be the problem as the encoded and decoding of the characters B and E may cause an error.

8 0
2 years ago
A group of Automation Anywhere Enterprise users are required to automate bots for a customer change requirement. The users find
stich3 [128]

There are a number of tools that have emerged since Automation was born. One such tool is the Automation Anywhere. It is a good example of an RPA tool that is used to automate various tasks and upload task bots. Automation Anywhere is made up of three main components. These components include Bot Creators, Bot Runners, and Control Room.

Further explanation

To answer the question, it is most likely that these users have a Community edition which does not allow them to upload bots to the control room. It is also most likely that the users are running a developer license and not a runner (Enterprise) license. Whether or not this is the case, the administrator needs to assign them an administrator role and not a developer one which I assume they are using

Community edition helps users interact with the most basic features of the tool before they are comfortable enough to upgrade to the Enterprise version. These users are able to automate bots for customers only if they have the Administrator role option. The Administration option is found on the Enterprise edition only and not the community edition.

Learn more about

brainly.com/question/11317405

brainly.com/question/11317405

#LearnWithBrainly

6 0
3 years ago
1. Print out the string length of s1 2. Loop through characters in s2 with charAt() and display reversed string 3. Compare s2, s
konstantin123 [22]

Answer:

See explaination

Explanation:

public class StringLab9 {

public static void main(String args[]) {

char charArray[] = { 'C', 'O', 'S', 'C', ' ', '3', '3', '1', '7', ' ', 'O', 'O', ' ', 'C', 'l', 'a', 's', 's' };

String s1 = new String("Objected oriented programming language!");

String s2 = "COSC 3317 OO class class";

String s3 = new String(charArray);

// To do 1: print out the string length of s1

System.out.println(s1.length());

// To do 2: loop through characters in s2 with charAt and display reversed

// string

for (int i = s2.length() - 1; i >= 0; --i)

System.out.print(s2.charAt(i));

System.out.println();

// To do 3: compare s2, s3 with compareTo(), print out which string (s2 or s3)

// is

// greater than which string (s2 or s3), or equal, print the result out

if (s2.compareTo(s3) == 0)

System.out.println("They are equal");

else if (s2.compareTo(s3) > 0)

System.out.println("s2 is greater");

else

System.out.println("s3 is greater");

// To do 4: Use the regionMatches to compare s2 and s3 with case sensitivity of

// the first 8 characters.

// and print out the result (match or not) .

if (s2.substring(0, 8).compareTo(s3.substring(0, 8)) == 0)

System.out.println("They matched");

else

System.out.println("They DONT match");

// To do 5: Find the location of the first character 'g' in s1, print it out

int i;

for (i = 0; i < s2.length(); ++i)

if(s2.charAt(i)=='g')

break;

System.out.println("'g' is present at index " + i);

// To do 6: Find the last location of the substring "class" from s2, print it

// out

int index = 0, ans = 0;

String test = s2;

while (index != -1) {

ans = ans + index;

index = test.indexOf("class");

test = test.substring(index + 1, test.length());

}

System.out.println("Last location of class in s2 is: " + (ans + 1));

// To do 7: Extract a substring from index 4 up to, but not including 8 from

// s3, print it out

System.out.println(s3.substring(4, 8));

} // end main

} // end class StringLab9

7 0
3 years ago
Here's something random idc
melisa1 [442]

Answer:

ey ey

Explanation:

3 0
3 years ago
Read 2 more answers
Betty was sitting at a coffee shop reading her favorite book. She heard an explosion nearby. In a few, she could hear ambulance
enot [183]
B or D are the options I would suggest.
4 0
2 years ago
Read 2 more answers
Other questions:
  • 1.
    5·2 answers
  • What 2 major agricultural inventions did jethro tull create?
    10·2 answers
  • HURRY UP NEED HELP!!! What are examples of curricular education? Check all that apply.
    9·2 answers
  • Most large organizations store data through a strategy called a(n) ________ to promote efficient and safe use of data across the
    11·1 answer
  • using C++ to sort user input. for example, user enter 25numbers and sort them from small to big or big to small, cout thesamlles
    6·1 answer
  • In general, digital to analog modulation equipment is less expensive than the equipment for encoding digital data into a digital
    8·1 answer
  • Why might reading a product review be a good idea before purchasing a product?
    5·2 answers
  • The function of anOR gate can best be described as a gate which provides an output of 1 only when
    10·1 answer
  • There are many commercially made household linens found in the?
    7·1 answer
  • Which term refers to the science that specifies the design and arrangement of items you use so you interact with the items effic
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!