(Solved) : Program Print Powers 2 Q27243085
program to print all powers of 2
Expert Answer
Attached . . .
program to print all powers of 2
Attached . . .
Done in c++ please
12THE triathalon PROBLEM Write a function triathlon that accepts an input stream and an output stream as arguments The input stream represents triathlon race results for athletes. Add up the swimming, biking. and running times for each athlete and report the total time for each athlete and their time difference from the winner’s. Each athlete’s data is represented by four tokens in the following order: athlete’s first name, swimming time, biking time, and running time (all times are given in minutes). The data for an athlete may or may not span multiple lines, but you are quaranteed the athletes will come in the order they finished the race (the winner’s data is first, the second place triathlete’s data comes next, etc.). Here is an example input. Notice the spacing and that the order the athletes appear are in the same order that they finished the race Meghan 12 48 23 Bryan 16 42 20 Lori 14 41 29 Jessica 18 37 30 Toni 19 43 29 Tamara 17 42 34 For this input, you function should produce the output below. For example, Meghan swam for 12 minutes, biked for 40 minutes, and ran for 23 minutes so it took for Meghan 75 minutes to finish the race. Notice that for the athletes that did not win the race, in addition to reporting their total race time, the difference in their time from the winner’s is also reported. For example, Bryan swam for 16 minutes, biked for 42 minutes, and ran for 20 minutes so it took Bryan 78 minutes to finish the race, which is 3 minutes longer than Meghan’s winning time of 75 minutes Meghan: 75 min Bryan: 78 min (+3 min) Lori: 84 min (+9 min) Jessica: 85 min (+1 min) Toni: 91 min (+16 min) Tanara: 93 min (+18 min) You may assume that the input stream contains data for at least one athlete. You may also assume that the input is valid; that the input has four tokens per athlete, the first token for arn athlete is a string and the following three are integers. Show transcribed image text 12THE triathalon PROBLEM Write a function triathlon that accepts an input stream and an output stream as arguments The input stream represents triathlon race results for athletes. Add up the swimming, biking. and running times for each athlete and report the total time for each athlete and their time difference from the winner’s. Each athlete’s data is represented by four tokens in the following order: athlete’s first name, swimming time, biking time, and running time (all times are given in minutes). The data for an athlete may or may not span multiple lines, but you are quaranteed the athletes will come in the order they finished the race (the winner’s data is first, the second place triathlete’s data comes next, etc.). Here is an example input. Notice the spacing and that the order the athletes appear are in the same order that they finished the race Meghan 12 48 23 Bryan 16 42 20 Lori 14 41 29 Jessica 18 37 30 Toni 19 43 29 Tamara 17 42 34 For this input, you function should produce the output below. For example, Meghan swam for 12 minutes, biked for 40 minutes, and ran for 23 minutes so it took for Meghan 75 minutes to finish the race. Notice that for the athletes that did not win the race, in addition to reporting their total race time, the difference in their time from the winner’s is also reported. For example, Bryan swam for 16 minutes, biked for 42 minutes, and ran for 20 minutes so it took Bryan 78 minutes to finish the race, which is 3 minutes longer than Meghan’s winning time of 75 minutes Meghan: 75 min Bryan: 78 min (+3 min) Lori: 84 min (+9 min) Jessica: 85 min (+1 min) Toni: 91 min (+16 min) Tanara: 93 min (+18 min) You may assume that the input stream contains data for at least one athlete. You may also assume that the input is valid; that the input has four tokens per athlete, the first token for arn athlete is a string and the following three are integers.
Attached . . .
13]. def detect-homopolymer(seq): # Given a DNA sequence in string object, this function will detect all homopolymers with # the minimum length of 8 or more (eg. ‘ccccccccccc’ or ‘AAAAAAAA” ). # Consequently, we need to know the homopolymer sequence, start and end position # as well as its length (eg., ‘ccccccccccc. , start-5, end-15, length-10) All # detected homopolymers will be saved into a list where each element of the ist is a # tuple that has 4 parts (e.g., (‘ccccccccccc 1,5,15, 10) ). homo list-D return homo-list # The returned list is named as homo-list Show transcribed image text 13]. def detect-homopolymer(seq): # Given a DNA sequence in string object, this function will detect all homopolymers with # the minimum length of 8 or more (eg. ‘ccccccccccc’ or ‘AAAAAAAA” ). # Consequently, we need to know the homopolymer sequence, start and end position # as well as its length (eg., ‘ccccccccccc. , start-5, end-15, length-10) All # detected homopolymers will be saved into a list where each element of the ist is a # tuple that has 4 parts (e.g., (‘ccccccccccc 1,5,15, 10) ). homo list-D return homo-list # The returned list is named as homo-list
Attached . . .
About 200?250words
13. (10pts) In the future, what is your plan to be a good manager? Please apply the knowledge you learned from class. anply the knowledge you leamed Show transcribed image text
Attached . . .
13) 111(011) bit Show transcribed image text
Attached . . .
13) 111(011) bit Show transcribed image text 13) 111(011) bit
Attached . . .
Coursehelpâ„˘ | Assignments solutions - CopyrightÂ© 2019