Question: specs for countNumbers 1. Write a program in a file called countNumbers.py 2. This program asks the user for one string. 3. it counts the

specs for countNumbers

1. Write a program in a file called countNumbers.py

2. This program asks the user for one string.

3. it counts the number of different digits in the string. for example a11111a1a1 contains a single digit, while a1s2d1d2d1d2d1 contains 2 digits.

4. do not use anything we haven't covered yet.

5. Examples:

% python3 countNumbers.py enter string: qwerty there are no digits in string: "qwerty"

% python3 countNumbers.py enter string: asdf1sdfg there is one digit in string: "asdf1sdfg"

% python3 countNumbers.py enter string: as1as2as333333 there are 3 different digits in string: "as1as2as333333"

% python3 countNumbers.py enter string: a0123456789x there are 10 different digits in string: "a0123456789x"

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!