Create a Program to Implement String Manipulation in Python Assignment Solution.

Instructions

Objective
Write a python homework program to implement string manipulation.

Requirements and Specifications

Introduction:
Assignments evaluates understanding student knowledge of manipulating string
Instructions:
1. Create a Python code file named M6HW_Digit Reading_FirstLast.py (replace "FirstLast" with your own name)
2. Add a title comment block to the top of the new Python file using the following form
3. # A brief description of the project

# Date

# CSC121 – Digits in String

```# Python program to calculate sum of numbers present in a string # Date : 08-04-2022 # CSC121 – Digits in String # Your Name #sum the integers numbers def string_num(test): temp = "0" Sum = 0 # read the input string for digit in test: # if current character is a digit if (digit.isdigit()): temp += digit # if current character is an alphabet else: # increment Sum Sum += int(temp) # reset temporary string to empty temp = "0" return Sum + int(temp) # check if the count of the intgers > 2 numbers def check(s): nums = [] k = "" for i in range(len(s)): if ord(s[i]) > 47 and ord(s[i]) < 58: k += s[i] else: if(k != ""): nums.append(int(k)) k = "" if(k != ""): nums.append(int(k)) return len(set(nums)) # test test = "I traveled 2 times in the past 3 days " # check if the count of the intgers > 2 numbers if check(test)<2: print("the count of the integers is less than 2") ```