I've written the code below and need to fill out a variable table like this:
- Variable name:
- Type:
- Validation:
- Description:
for all variables. However, as I am really really new to python I don't know what the variables are, let alone their details.
I found this example:
- Variable name:
userName
- Type:
String
- Validation:
Must only contain characters a-z/A-Z.
- Description:
Will be used to store the user’s name.
But I don't know how to do it for the variables in my code. Please help if you can.
print("Please enter a sentence")
sentence=input ()
lowersen=(sentence.lower () )
print(lowersen)
splitlowersen=(lowesen.strip () )
splitlowersen = "".join(c for c in splitlowersen if c not in ('!','.',':','?',';'))
print("Enter word")
word=input()
lword=(word.lower () )
if lword in splitlowersen:
print(lword, "is in sentence")
for i, j in enumerate (splitlowersen) :
if j==lword:
print(""+lword+"","is in position", i+1)
if lword not in splitlowersen:
print (lword, "is not in sentence")
print ("End")