There is a multiline string variable i.e. inputString = ‘Dell Display Manager’s (DDM) Easy Arrange feature lets you quickly tile and view your applications side by side across one or more connected screens for multitasking efficiency. And with the improved DDM, you’ll get even more preset layouts. The auto-restore feature remembers where you left off, so applications will go back to where you left them, even after you’ve unplugged.’ Write Python code that: a. Prints inputString as it is. [Hint: use escape sequence] b. Copies inputString into inputStringNew in a way that the last sentence will become the first sentence of inputStringNew: inputStringNew = ‘The auto-restore feature remembers where you left off, so applications will go back to where you left them, even after you’ve unplugged. Dell Display Manager’s (DDM) Easy Arrange feature lets you quickly tile and view your applications side by side across one or more connected screens for multitasking efficiency. And with the improved DDM, you’ll get even more preset layouts.’ [Hint: use format() to change position] c. Creates another string output string from input string which is actually a slice of inputString, and prints the output string: output string = ‘you’ll get even more preset layouts’ [Hint: use slicing operator] d. Applies iteration on inputString, to count characters of inputString, other than letter ‘D’
There is a multiline string variable i.e. inputString = ‘Dell Display Manager’s (DDM) Easy Arrange feature lets you quickly tile and view your applications side by side across one or more connected screens for multitasking efficiency. And with the improved DDM, you’ll get even more preset layouts. The auto-restore feature remembers where you left off, so applications will go back to where you left them, even after you’ve unplugged.’ Write Python code that: |
|
a. Prints inputString as it is. [Hint: use escape sequence] |
|
b. Copies inputString into inputStringNew in a way that the last sentence will become the first sentence of inputStringNew: inputStringNew = ‘The auto-restore feature remembers where you left off, so applications will go back to where you left them, even after you’ve unplugged. Dell Display Manager’s (DDM) Easy Arrange feature lets you quickly tile and view your applications side by side across one or more connected screens for multitasking efficiency. And with the improved DDM, you’ll get even more preset layouts.’ [Hint: use format() to change position] |
|
c. Creates another string output string from input string which is actually a slice of inputString, and prints the output string: output string = ‘you’ll get even more preset layouts’ [Hint: use slicing operator] |
|
d. Applies iteration on inputString, to count characters of inputString, other than letter ‘D’ |
|
Step by step
Solved in 2 steps with 1 images