Questions 19-23 Which code blocks correctly compare two stri…
Questions 19-23 Which code blocks correctly compare two strings, character by character, and print only the characters that match, as shown in the following examples? Examples: python matches.py hourse house hou python matches.py bolus torus ous python matches.py banana fruitcake Select all that apply.
Read DetailsQuestions 14-17 Which of the following programs can increase…
Questions 14-17 Which of the following programs can increase the number in the middle of each CSV row by 1? Execution python add_one.py input.txt output.txt input.txt quail,10,Provo robin,3,Provo junco,1,Orem output.txt quail,11,Provo robin,4,Provo junco,2,Orem
Read DetailsQuestions 24-30 Consider the following program: subs.py imp…
Questions 24-30 Consider the following program: subs.py import sys def substitute(text, substitutions): … def main(text, substitutions): text = substitute(text, substitutions) print(text) if __name__ == ‘__main__’: options = { “bird”: “feathered critter”, “fish”: “wet critter”, “dog”: “happy critter”, “cat”: “furry critter” } main(sys.argv[1], options) Which of the following implementations of substitute can produce this execution: python subs.py “My dog likes to watch the fish swim. My cat wants to catch the bird in the tree.” My happy critter likes to watch the wet critter swim. My furry critter wants to catch the feathered critter in the tree.
Read Details