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
What are expansion cards used for?​
S_A_V [24]

Answer:

an expansion card is a PCB that fits into an expansion slot on a desktop computer. An expansion card is used to give a computer additional capabilities, such as enhanced video performance via a graphics card.

Explanation:

4 0
2 years ago
Read 2 more answers
Random Walker Collisions In lecture, we saw how to model the behavior of a random walker on a 2D grid using a Monte Carlo simula
vlabodo [156]

Answer:

dang how long did i take for you to wright all this and that lecture was cool

Explanation:

6 0
2 years ago
Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
alekssr [168]

Answer:

"public static void passAList(ArrayList<Integer> myList, int[] intArr)", is the correct answer for the above question.

Explanation:

Missing information :

  • The option is missing but the question states "choose from the following". The correct defining syntax is defined above.

Detailed Explantion :

  • The above question asked about syntax which takes the value of list and array as an argument.
  • It is already defined in the above syntax.
  • And the value is passed by the user at the time of function call.
  • The array list is defined by the help of the ArrayList class and the array is defined by the help of the "[]" symbol.

3 0
3 years ago
What actions might contribute to recommendations you see online?
Virty [35]

Answer: what you search up

8 0
1 year ago
________ employees state-of-the-art computer software and hardware to help people work better together.
natulia [17]

The correct answer is collaborative computing

Using state-of-the-art computer software and hardware to help people work better together is known as collaborative computing. Goal setting and feedback will be conducted via Web-based software programs such as eWorkbench, which enables managers to create and track employee goals.

6 0
3 years ago
Other questions:
  • What effects will the different types of lighting produce on mountains?
    15·1 answer
  • How is the Task Manager helpful in displaying which resources your computer is using and how fast?
    5·2 answers
  • Explain how to identify a starting position on a line.
    15·2 answers
  • On a Linux system, which command allows you to modify settings used by the built-in packet filtering firewall?
    15·1 answer
  • Jason Has A Science Video Project, As He Creats His Project, He Saves, Then Comes Back A Minute Later. The File Is Now Unreadabl
    8·2 answers
  • )In a graph represented by adjacency matrix u can find all the neighbours of a given vertices in ____Operations
    6·1 answer
  • IN WHICH COUNTRY DO THEY LET YOU PLAY MINECRAFT IN SCHOOL?
    8·2 answers
  • High-level languages must be translated into machine language before they can be executed. _________________________
    10·1 answer
  • What is the optimal number of members for an Agile team?
    10·1 answer
  • ________ technologies are technologies that enable the incremental improvement of products and services.
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!