Answer:
Explanation:
Clearer rendering reads;
"Give the lengths of N words (0 <N ≤ 5 000), consisting of at least one character. Display the minimum required length R of a line on a page, so that on each line the cumulative length of the words is exactly R (no spaces between them). Words are not allowed to be separated".
Answer:
Python Code:
def validate_url(url):
#Creating the list of valid protocols and file name extensions
valid_protocols = ['http', 'https', 'ftp']
valid_fileinfo = ['.html', '.csv', '.docx']
#splitting the url into two parts
url_split = url.split('://')
isProtocolValid = False
isFileValid = False
#iterating over the valid protocols and file names for validity
for x in valid_protocols:
if x in url_split[0]:
isProtocolValid = True
break
for x in valid_fileinfo:
if x in url_split[1]:
isFileValid = True
break
#Returning the result if the URL has both valid protocol and file extension
return (isProtocolValid and isFileValid)
url = input("Enter an URL: ")
print(validate_url(url))
Explanation:
The image of the output code is attached. Hope it helps.
Answer:
I'd go with the 2nd one
If it heats up more & more, then it's lifespan will be shortened more & more. The more it heats up, the less durability it has.