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
A project manager is responsible for (check all that apply)
Klio2033 [76]
When I answered this it was C
3 0
2 years ago
write a program that computes an integer's checksum. to compute the checksum, break the integer into its constituent
Serggg [28]

Using the knowledge in computational language in python it is possible to write a code that computes an integer's checksum.

<h3>Writting the code:</h3>

<em>def checkSum(n):                    # Function definition</em>

<em>    total = 0                       # total variable which returns sum</em>

<em>    c = 0                           # counter variable which count the even position</em>

<em>    while(n!=0):                    # running a loop while n != 0</em>

<em>        r = int(n%10)               #breaking the number into digits</em>

<em>        c=c+1                       # increase counter</em>

<em>        if c%2==0:                  # if counter is even position then double the number </em>

<em>            r = r*2</em>

<em>            while(r!=0):                            # do the process</em>

<em>                total = total + int(r%10)</em>

<em>                r = int(r/10)</em>

<em>            n=int(n/10)    </em>

<em>        else:                       # if counter is odd position then simple add the digit </em>

<em>            total = total + r       # into total</em>

<em>            n=int(n/10)</em>

<em>    return total                    # in the last return the sum of digits</em>

<em># Driver code</em>

<em>n = int(input("Enter Number:"))         # asking user to enter the number </em>

<em>print(checkSum(n))                      # calling the function</em>

See more about python at brainly.com/question/18502436

#SPJ1

8 0
1 year ago
Types of computer viruses<br>​
e-lub [12.9K]

Answer:anti various

Explanation:hope fully this will help u

5 0
3 years ago
Read 2 more answers
NEED HELP FAST timed
Andrej [43]

ton

Answer:

piston - engine book

values- crackshaft rod

head- camshaft

3 0
2 years ago
Write the include directive needed to allow use of the various i/o functions and values such fprintf and fgetc.
noname [10]

#include <stdio.h> //stdio stands for STanDard Input/Output

5 0
3 years ago
Other questions:
  • Which component is the smallest unit in a spreadsheet?
    14·2 answers
  • In what ways are Outlook notes useful for personal or professional use? Check all that apply.
    13·2 answers
  • Design a method for representing the state of a tic-tac-toe board in computer memory. can you fit your representation into three
    12·2 answers
  • The title bar of a window tells you the name of the document or program that's being displayed in the window, and it also serves
    11·1 answer
  • When you move or size a control in the Form Designer, Visual Studio automatically adjusts the ________________ that specify the
    9·1 answer
  • Pascal's Triangle is a triangular array in which every number represents the
    15·1 answer
  • The M:N relationship between STUDENT and CLASS must be divided into two 1:M relationships through the use of the ENROLL entity;
    10·2 answers
  • Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on yo
    12·1 answer
  • Explain ONE negative outcomes of not matching an ICT product to the correct audience:
    15·1 answer
  • The G&amp;T Guild Charter uses some terminologies that contain the word Treasure'. Identify these terminologies.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!