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 00:30
To insert a column without using commands in any tabs, a user can -click and then click insert column.
Answers: 3
Computers and Technology, 22.06.2019 18:00
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
Computers and Technology, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
This assignment is based on Exercise 8.4 from your textbook. Each of the following Python functions...
Biology, 06.07.2019 06:00
Computers and Technology, 06.07.2019 06:00
Mathematics, 06.07.2019 06:00
Computers and Technology, 06.07.2019 06:00
Computers and Technology, 06.07.2019 06:00
Mathematics, 06.07.2019 06:00
Computers and Technology, 06.07.2019 06:00
History, 06.07.2019 06:00