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
Alecsey [184]
3 years ago
14

Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T

he output of the program is every word in the list that contains the character at least once. Assume at least one word in the list will contain the given character. Assume that the list of words will always contain fewer than 20 words.
Ex: If the input is:
4 hello zoo sleep drizzle z
then the output is:
zoo
drizzle
To achieve the above, first read the list into an array. Keep in mind that the character 'a' is not equal to the character 'A'.
Computers and Technology
1 answer:
MrMuchimi3 years ago
7 0

In python 3.8:

user_input = input().split()

x = user_input[0]

char = user_input[-1]

for w in range(1,int(x)+1):

   if char in user_input[w]:

       print(user_input[w])

I hope this helps

You might be interested in
Which XXX will prompt the user to enter a value greater than 10, until a value that is greater than 10 is actually input?
aleksley [76]

Answer:

b. (userInput < 10)

Explanation:

The piece of code that will accomplish this would be (userInput < 10). The code will first ask the user to "Enter a number greater than 10:" then it will compare the value of userInput to 10, if it is less than 10 it will redo the loop over and over again until the userInput is greater than 10. Once the userInput is greater than 10 it will break out of the do-while loop and continue whatever code is written under and outside the do-while loop

4 0
3 years ago
What internal commands can we use when in interactive mode? can we use CLS and CD?
krok68 [10]
The cd command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.
3 0
3 years ago
Does anyone know the answer to 2 and 3
docker41 [41]
No because u ain’t put the question up here for someone to answer
6 0
3 years ago
Which one Bc I’m struggling
amid [387]
14 is c and 16 a btw do you go to connection academy
6 0
3 years ago
Read 2 more answers
The Go To feature can be accessed from which of the following dialog boxes?
Aliun [14]

Answer:

hoose the answer.

•Font

•Open

•Insert Hyperlink

Explanation:

4 0
3 years ago
Other questions:
  • Where can you make changes to AutoCorrect?
    14·2 answers
  • Write a program that reads a stream of integers from a file and writes only the positive numbers to a second file. The user shou
    5·1 answer
  • Annalise received financial aid offers from two universities. Financial Analysis for Option A Costs per Year Financial Aid Packa
    8·2 answers
  • A. True
    13·1 answer
  • When max() function is used on lists of words, what does max() find? For example:
    13·1 answer
  • What is the build in libary function to compare two strings?​
    15·1 answer
  • Prepare algorithm and draw a corresponding flowchart to compute the mean value of all odd numbers between 1 and 100 inclusive.​
    10·1 answer
  • You develop an app, and you don’t want anyone to resell it or modify it. This is an example of: A
    5·1 answer
  • List different examples of models​
    5·1 answer
  • Choose the term to complete the sentence.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!