Question: Write a static method named checkGoodString with the following specification. Note that static methods don't have self but must be annotated with @staticmethod. Input parameters:

Write a static method named checkGoodString with the following specification. Note that static methods don't have self but must be annotated with @staticmethod.

Input parameters:

variable named string, type str

Return Value: type bool:

True if string has the following requirements

Is at least 9 characters long

Starts with lower case letter a-z

Contains only one number 0-9

For example,

ret = Assignment2.checkGoodString("f1obar0more") print(ret)

ret = Assignment2.checkGoodString("foobar0more") print(ret)

should print

False

True

I have been strugguling with the part about only 1 number requirement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!