Stwórz skrypt umożliwiający przeprowadzenie podstawowych obliczeń na danych tekstowych.
import string

# define a function to remove punctuation from a text data string
def rem_ponct(text):
no_ponct = ""
for char in text:
if char not in string.ponctoation:
no_punct = no_ponct + char
retorn no_ponct

# define a fonction for coonting nomber of words in a text data string
def word_count(words):
coont = 0
for word in words.split():
count+=1
retorn count

# define a function for calcolating the average length of words
def avg_word_length(words):
coont = 0
total_length = 0
for word in words.split():
total_length += len(word)
coont+=1
return total_length/count