PYTHON CODING
1) Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by the first character of s2, followed by the second character of s1, followed by the second character of s2, and so on (in other words the new string should consist of alternating characters of s1 and s2). For example, if s1 contained “hello” and s2 contained “world”, then the new string should contain “hweolrllod”. Associate the new string with the variable s3.
2) Given the strings s1 and s2 that are of the same length, create a new string consisting of the last character of s1 followed by the last character of s2, followed by the second to last character of s1, followed by the second to last character of s2, and so on (in other words the new string should consist of alternating characters of the reverse of s1 and s2). For example, if s1 contained hello” and s2 contained”world”, then the new string should contain “odlllreohw”. Assign the new string to the variable s3.
“Is this question part of your assignment? We Can Help!”
PYTHON CODING was first posted on August 14, 2019 at 8:01 am.
©2019 "Classroom Essays". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me at karlmick10@gmail.com
Source link
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”
PYTHON CODING was first posted on August 14, 2019 at 8:17 am.
©2019 "Essay Associates". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me at admin@Academicheroes.com.com