python programming

Joan Sandy

  

Assume s is a string of numbers.

Write a program that checks the string s for the values '2', '3', '5' and '7'. When one of the values is found in the string, record its position within the string and continue to check for more occurrences. Finally, output the results found.

For example, if s = '568714523645873', your program should print:


2 - 7

3 - 8 14

5 - 0 6 11

7 - 3 13

Give Five (5) different examples with its output. 

    • 8 years ago
    • 20
    Answer(3)

    Purchase the answer to view it

    NOT RATED

      Purchase the answer to view it

      NOT RATED
      • program.py

      Purchase the answer to view it

      NOT RATED
      • python_Assign.zip