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
What do all social media sites have in common? (Must check all that apply)
Georgia [21]
* <span>They all engage users with fun or interesting features.
*</span><span>They encourage people to participate.</span>
3 0
3 years ago
g Write a Racket function (process lst1 lst2) that processes the corresponding elements of the two lists and returns a list. If
blagie [28]

Answer:

  1. def process(lst1, lst2):
  2.    newList = []
  3.    for i in range(0, len(lst1)):
  4.        sum = lst1[i] + lst2[i]
  5.        newList.append(sum)
  6.    return newList
  7. list1 = [1, 3, 5, 7, 9]
  8. list2 = [2, 4, 6, 8, 10]
  9. print(process(list1, list2))

Explanation:

Firstly, create a function process that takes two input lists (Line 1). In the function, create a new list (Line 2). Use a for loop to traverse through the elements of the two lists and total up the corresponding elements and add the sum to the new list (Line 3 - 5). At last, return the new list (Line 6).

In the main program, create two sample list and use them as arguments to test the function process (Line 8 - 9). We shall get the output  [3, 7, 11, 15, 19].

8 0
3 years ago
Increasingly patients are creating and maintaining personal health records (PHRs) with data from a variety of healthcare provide
mestny [16]

Researchers should carry out investigations on different platforms for providing PHRs, such as mobile phones, so as to complement PHRs.

<h3>What are PHRs?</h3>

PHRs is an acronym for personal health records and it can be defined as an electronic database (repositories) that are designed and developed to assist patients in accessing, managing and sharing their health information in a well-secured, private, and confidential manner.

Researchers carrying out experiments and investigations on different digital platforms that are used for providing PHRs, such as mobile phones, is a provision which should be included in a model privacy and security policy, in order to complement personal health records (PHRs).

Read more on personal health records here: brainly.com/question/15065417

#SPJ1

7 0
2 years ago
Below is a list of 32-bit memory address references, given as word addresses.
Maru [420]

For a direct mapped cache the general rule is: first figure out the bits of the offset (the right-most bits of the address), then figure out the bits of the index (the next-to right-most address bits), and then the tag is everything left over (on the left side).

One way to think of a direct mapped cache is as a table with rows and columns. The index tells you what row to look at, then you compare the tag for that row, and if it matches, the offsettells you which column to use. (Note that the order you use the parts: index/tag/offset, is different than the order in which you figure out which bits are which: offset/index/tag.)

So in part (a) The block size is 1 word, so you need 0 offset bits (because <span><span><span>20</span>=1</span><span><span>20</span>=1</span></span>). You have 16 blocks, so you need 4 index bits to give 16 different indices (because <span><span><span>24</span>=16</span><span><span>24</span>=16</span></span>). That leaves you with the remaining 28 bits for the tag. You seem to have gotten this mostly right (except for the rows for "180" and "43" where you seem to have missed a few bits, and the row for "181" where you interchanged some bits when converting to binary, I think). You are correct that everything is a miss.

For part (b) The block size is 2 words, so you need 1 offset bit (because <span><span><span>21</span>=2</span><span><span>21</span>=2</span></span>). You have 8 blocks, so you need 3 index bits to give 8 different row indices (because <span><span><span>23</span>=8</span><span><span>23</span>=8</span></span>). That leaves you with the remaining 28 bits for the tag. Again you got it mostly right except for the rows for "180" and "43" and "181". (Which then will change some of the hits and misses.)

5 0
3 years ago
Read 2 more answers
What are dividends? A
Scilla [17]
<span>a number to be divided by another number.</span>
8 0
3 years ago
Read 2 more answers
Other questions:
  • Henry bought a new card for capturing television on his computer. When he finished going through the packaging, though, he found
    5·1 answer
  • Behaving in an acceptable manner in a workplace environment is referred to as workplace etiquette.
    12·2 answers
  • Why computer is known as versatile and diligent device ?explain​
    14·1 answer
  • Write a Java application that inputs a series of 10 integers and determines and prints the largest and smallest integer. Use a c
    12·1 answer
  • Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and checki
    8·1 answer
  • A(n) _____ measures the ability to juggle a variety of demands, as in a manager's job where the candidate is presented with simu
    8·1 answer
  • What data discovery process, whereby objects are categorized into predetermined groups, is used in text mining?
    9·1 answer
  • A constructor can be overloaded with more than one function which has the same name but with what two different things
    7·1 answer
  • ☢☢☢does anyone know how to do the TYNKER CANNON assignment ( lesson 2 intro to game design) I'll give BRANLIEST(¬‿¬)❤ dont answe
    11·2 answers
  • EASY QUESTION EASY POINTS!!!!! WILL MARK BRAINLIEST!!!!!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!