a. Prints inputString as it is. [Hint: use escape sequence] b. Copies inputString into inputStringNew in a way that 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 outputString from inputString which is actually a slice of inputString, and prints the outputString: outputString = ‘you’ll get even more preset layouts’ [Hint: use slicing operator]
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 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 outputString from inputString which is actually a slice of inputString, and prints the outputString: outputString = ‘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 3 steps with 3 images