Python!!
A keyboard can be really tricky! You try to enter a number but it prints a letter again and again! Let's try to fix that.
Create a function is_this_digit(input_line) that checks if the string parameter is a digit. The function should return True or False
1.1. String contains only one digit if the string length is 1 and the character inside is digit character. To check last condition use .isdigit() function (e.g., "2".isdigit() will return True) or string comparison such as "0" <= target="">=><=>=>
Read the input from the user(use input())
Continue to repeat reading the input, until user inputs digit
When we finally have a digit provided as an input, then output it in the following sentence: Your digit is DDD (where DDD is replaced by the provided digit).
The code I should complete:
def is_this_digit(input_line): # Define your function here pass
if __name__ == '__main__': # Type your code here.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here