Computers and Technology, 01.03.2021 14:50 behemoth42
This assignment is based on Exercise 8.4 from your textbook. Each of the following Python functions is supposed to check whether its argument has any lowercase letters.
For each function, describe what it actually does when called with a string argument. If it does not correctly check for lowercase letters, give an example argument that produces incorrect results, and describe why the result is incorrect.
# 1
def any_lowercase1(s):
for c in s:
if c. islower():
return True
else:
return False
# 2
def any_lowercase2(s):
for c in s:
if 'c'.islower():
return 'True'
else:
return 'False'
# 3
def any_lowercase3(s):
for c in s:
flag = c. islower()
return flag
# 4
def any_lowercase4(s):
flag = False
for c in s:
flag = flag or c. islower()
return flag
# 5
def any_lowercase5(s):
for c in s:
if not c. islower():
return False
return True
Answers: 2
Computers and Technology, 22.06.2019 08:30
Linda subscribes to a cloud service. the service provider hosts the cloud infrastructure and delivers computing resources over the internet.what cloud model is linda using
Answers: 1
Computers and Technology, 22.06.2019 16:00
If a client wants to make minor edits, what should he/she use?
Answers: 3
Computers and Technology, 22.06.2019 16:30
What type of file does a cookie place on web site visitors' computers so that web site managers can customize their sites to their visitors' preferences?
Answers: 1
Computers and Technology, 24.06.2019 01:30
How can you make your column headings stand out?
Answers: 1
This assignment is based on Exercise 8.4 from your textbook. Each of the following Python functions...
Mathematics, 30.06.2019 06:40
History, 30.06.2019 06:40
Mathematics, 30.06.2019 06:40
Mathematics, 30.06.2019 06:40
Mathematics, 30.06.2019 06:40
Business, 30.06.2019 06:40
Health, 30.06.2019 06:40
Biology, 30.06.2019 06:40
Biology, 30.06.2019 06:40
Biology, 30.06.2019 06:40