So I have to create code that validate whether a password:
Return true if all characters in the string are digits and there is at least one character, false otherwise.
Return true if all cased characters in the string are uppercase and there is at least one cased character, false otherwise.
What you need is using the any built-in function:
any([x.isdigit() for x in password])
will return True if at least one digit is present in password
any([x.isupper() for x in password])
will return True if at least one character is considered as uppercase.