Answer:
Following are the program to the given question:
def check_digit(number): #defining a method check_digit that takes number variable in parameter
if(numumber.isdigit()): #use if to check value is digit
return "yes"; #use return to return string value "yes"
else: #else block
return "no";#use return to return string value "no"
string=input("Enter the numbers 0-9: ") #defining a variable string that input value from the user
print(check_digit(string)) #use print that call the method and print its return value
Output:
Please find the attached file.
Step-by-step explanation:
In this code a method "check_digit()", which accepts an argument "number" in its parameter inside the function.
A conditional statement is used if it checks the number used "isdigit()" method that checks value is a digit and return value "yes" and in the else block it will return value "no".
Outside the method, a variable "string" is declared that input the value from the user-end and call the check_digit and print its value.