Answer:
The solution or expression for each part is given below:
- int(s)
- s[len(s)-1]
- last.capitalize()+','+first.capitalize()
- str(x)
- s[5:]
Explanation:
Following are attached the images that show how these expressions will be used. I hope they will make the concept clear.
All the images below are respective to the questions given.
Answer:
shading?
Explanation:
Ombré /ˈɒmbreɪ/ (literally "shaded" in French) is the blending of one color hue to another, usually moving tints and shades from light to dark. It has become a popular feature for hair coloring, nail art, and even baking, in addition to its uses in home decorating and graphic design.
Answer:
Operating system is the software that is used to control different hardware of computers and handle scheduled tasks.
It also handles the interrupts from some external devices, or from some software. The interrupts are handled through Interrupt service routine. When some external event occurs the following steps has been taken by OS to perform the operation
- In first step, an external event has been occurred, and request to the cpu to perform operation.
- This request invoke ISR (Interrupt service routine), to perform the operation.
- The interrupts are stored in stack on the priority basis.
- The CPU performs the operation on Interrupt as per request of ISR.
- After Completing operation, CPU return to its initial task.
Answer:
Speakers.
Explanation: Cause they only output sound, and are devices, further more they are not used to output images, like how could speakers output images using sound? They can't.
Shuffle (A[1..m], B[1..n], C[1..m+n]):
Shuf[0, 0] ← True
for j ← 1 to n
Shuf[0, j] ← Shuf[0, j − 1] ∧ (B[j] = C[j])
for i ← 1 to n
Shuf[i, 0] ← Shuf[i − 1, 0] ∧ (A[i] = B[i])
for j ← 1 to n
Shuf[i, j] ← False
if A[i] = C[i + j]
Shuf[i, j] ← Shuf[i, j] ∨ Shuf[i − 1, j]
if B[i] = C[i + j]
Shuf[i, j] ← Shuf[i, j] ∨ Shuf[i, j − 1]
return Shuf[m, n]
The algorithm runs in O(mn) time.