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 is the most commonly used tab in the Filter dialog box?
aleksandrvk [35]

The answer is Messages

3 0
3 years ago
Read 2 more answers
Which attributes are indicators that a website is reliable? Check all that apply is up to date explains sources of data is an ed
Ahat [919]

Answer:

1 - Is up to date

2 - explains sources of data

3 - is an educational website

6 - will not share personal information

7 - has articles written by experts

7 0
3 years ago
Can someone let me join your kingdom if anybody knows this game and plays it as well. ​
Assoli18 [71]

Answer:

sure is called voxetas

Explanation:

7 0
3 years ago
What does N represent when analyzing algorithms?
Mademuasel [1]

Answer: "N" is considered as the size of the input that is being given in the algorithm.

Explanation: During a problem solving process , a algorithm is used to analyze the problem . Many function and  steps are to be taken care of while analyzing algorithm. Among analyzing step, input is also given which is usually zero more than that . An input has a certain size which is given by the initial "N".  The input size defines the length of the string for the input.

4 0
3 years ago
Use System.DateTime along with System.Console to implement a simple C# program that does the following:_______.
Andre45 [30]

Answer:

5

Explanation:

I did it to and it was right

3 0
3 years ago
Other questions:
  • A(n)________________ is something that goes into a system a resource such as time,money,communication,etc
    10·1 answer
  • Opinions are always based on facts. <br> a. True<br> b. False
    7·2 answers
  • An application is to be written that would allow students to find out their GPA(double) and their total number of credits (an in
    15·1 answer
  • Write the function mystrchr(). the function has two parameters: a const char * s pointing to the first character in a c-style st
    14·1 answer
  • why is it important for you to understand and describe the internal and external components of a computer in the workplace​
    14·1 answer
  • Blank includes websites that encourage interaction and connection among people businesses and organizations
    14·2 answers
  • Create a program that asks the user to enter grade scores. Use a loop to request each score and add it to a total. Continue acce
    9·1 answer
  • If you define a destructor, are you required to define an operator '=' and a copy constructor?
    9·1 answer
  • Identify a characteristic of electronic meeting systems.
    10·1 answer
  • Which of the following is NOT a type of insurance fraud?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!