Computer Science, asked by jessiebellefeuille, 10 months ago

which of python expressions evaluates to string "dry"
a) "laundry" [5:]
b) "drying" [1:3]
c) "the dry lake" [4:7]
d) "the dry lake" [4:6]

Answers

Answered by njb007
2

Answer:

C is the correct t

Explanation:

I hope so bcz I only studied java but have some idea about python also.

Answered by suskumari135
0

c) "the dry lake" [4:7] is correct answer.

Explanation:

Python Program

s = 'the dry lake'

print('First five characters : ' , s[:5])

print('Fourth_to_Seventh_Character : ', s[4:7])

print('Characters from filth onward : ', s[5:])

print('One_to_Third_Character : ', s[1:3])

print('Fourth_to_Sixth_Character : ', s[4:6])

Output:

First five characters :  the d                                                                                       Fourth_to_Seventh_Character :  dry                                                                                   Characters from fifth onward :  ry lake                                                                             One_to_Third_Character :  he                                                                                         Fourth_to_Sixth_Character :  dr

Similar questions