subject

Write a method called findnames that meets the following specs: it takes two arguments: a list of strings, allnames, and a string, wanted creates and returns a new list containing only the strings from, allnames, that contain the name stored in wanted as a substring. list allnames should remain unmodified: do not delete, or modify the names in it. this should work in a case insensitive manner, but the names in your result list should be exactly as they are in a (i. e. not converted to lower case). we referred to allames and what the method retums as 'lists', but you are free to represent cach one of them however you want: array or arraylist. no error checking needed. example behavior: if allnames is: ["bob smith", "elroy jetson", "christina johnson", "rachael baker", "chris conly"] and wanted is "chris" the resulting list, should be: ["christina johnson", "chris conly"] because only those two strings contain "chris"

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print.
Answers: 1
question
Computers and Technology, 22.06.2019 08:40
1. the program must provide following functions to extract some statistics. note that the data_list parameter specified in these functions may be the same for all functions or different for different functions—that is your choice. a skeleton file is provided on mirmir. a) open_file()prompts the user to enter a year number for the data file. the program will check whether the year is between 1990 and 2015 (both inclusive). if year number is valid, the program will try to open data file with file name ‘year.txt’, where is the year. appropriate error message should be shown if the data file cannot be opened or if the year number is invalid. this function will loop until it receives proper input and successfully opens the file. it returns a file pointer and year. i. hint: use string concatenation to construct the file name b) read_file(fp)has one parameter, a file pointer read. this function returns a list of your choosing containing data you need for other parts of this project. c) find_average(data_list) takes a list of data (of some organization of your choosing) and returns the average salary. the function does not print anything. hints: i. this is not the average of the last column of data. it is not mathematically valid to find an average by finding the average of averages—for example, in this case there are many more in the lowest category than in the highest category. ii. how many wage earners are considered in finding the average (denominator)
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
You know the right answer?
Write a method called findnames that meets the following specs: it takes two arguments: a list of...
Questions
question
Mathematics, 10.11.2019 21:31
question
History, 10.11.2019 21:31
question
Biology, 10.11.2019 21:31
Questions on the website: 13722367