def validate_priority(priority): ''' validate the "priority" parameter Returns True if "priority" is a string containing a number 1-5 Returns False otherwise ''' if (priority.isdigit()): if (priority == 1): return True elif (priority == 2): return True elif (priority == 3): return True elif (priority == 4): return True elif (priority == 5): return True else: return False pass value for "priority" must be a string that contains a number 1-5 this is my code
def validate_priority(priority): ''' validate the "priority" parameter Returns True if "priority" is a string containing a number 1-5 Returns False otherwise ''' if (priority.isdigit()): if (priority == 1): return True elif (priority == 2): return True elif (priority == 3): return True elif (priority == 4): return True elif (priority == 5): return True else: return False pass value for "priority" must be a string that contains a number 1-5 this is my code
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 2RQ
Related questions
Question
def validate_priority(priority):
'''
validate the "priority" parameter
Returns True if "priority" is a string containing a number 1-5
Returns False otherwise
'''
if (priority.isdigit()):
if (priority == 1):
return True
elif (priority == 2):
return True
elif (priority == 3):
return True
elif (priority == 4):
return True
elif (priority == 5):
return True
else:
return False
pass
- value for "priority" must be a string that contains a number 1-5
- this is my code
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT