Update the program you wrote for Q11 so that it can now zip strings of different lengths.

Update the program you wrote for Q11 so that it can now zip strings of different lengths. The two strings are zipped as before, with the extra characters in the longer of the two strings concatenated to the end of the zipped string. Note: You must use a for... in loop and the range() function. The output of the program must be in the format shown in the examples below, including the format of the prompt, and all spaces and punctuation. For example: Enter the first string: short Enter the second string: long The zipped string is: slhoonrgt Enter the first string: hello Enter the second string: The zipped string is: hello Answer: (penalty regime: 0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50%)

Update the program you wrote for Q11 so that it can now zip strings of different lengths. The two strings are zipped as before, with the extra characters in the longer of the two strings concatenated to the end of the zipped string.  Note:  You must use a for... in loop and the range() function. The output of the program must be in the format shown in the examples below, including the format of the prompt, and all spaces and punctuation.  For example:  Enter the first string: short Enter the second string: long The zipped string is: slhoonrgt Enter the first string: hello Enter the second string:  The zipped string is: hello Answer: (penalty regime: 0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50%)

Update the program you wrote for Q11 so that it can now zip strings of different lengths. The two strings are zipped as before, with the extra characters in the longer of the two strings concatenated to the end of the zipped string.

Note:

You must use a for… in loop and the range() function.
The output of the program must be in the format shown in the examples below, including the format of the prompt, and all spaces and punctuation.

For example:

Enter the first string: short
Enter the second string: long
The zipped string is: slhoonrgt

Enter the first string: hello
Enter the second string:
The zipped string is: hello

Answer: (penalty regime: 0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50%)


Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.

Instant
Download

Student review: (5 ratings) 5 out of 5 people found this solution helpful.