Discuss Scratch

akr87
New Scratcher
3 posts

Removing punctuation marks

hi guys
I need some help
I am trying to create a script with scratch, that will help me remove any punctuation marks after the user has input their text.
Which will then generate the same text after, without the punctuation marks.

any help will be grateful


deck26
Scratcher
1000+ posts

Removing punctuation marks

Please look through the first two pages of the forum - you're at least the fourth person to ask for help with this assignment.
098765432154321
Scratcher
500+ posts

Removing punctuation marks

whenclickeddeleteallofpunctuation marksadd.topunctuation marksadd?topunctuation marksadd,topunctuation marksadd!topunctuation marksadd"topunctuation marksadd:topunctuation marksadd;topunctuation marksadd'topunctuation marksadd-topunctuation marksadd/topunctuation marksadd...topunctuation marksadd(topunctuation marksadd)topunctuation marksset#to0askSentence?andwaitrepeatuntil#=lengthofanswerchange#by1addletter#ofanswertoletterssetpu#to0setpu#2to0repeatuntilpu#=lengthofanswerchangepu#by1repeatuntilpu#2=lengthofpunctuation markschangepu#2by1ifletterpu#ofanswer=itempu#2ofpunctuation marksthendeletepu#oflettersifletterpu#ofanswer=item9ofpunctuation marksthendeletepu#ofletterssetpu#2to0
hope this one works
edit: i haven't been on the forum since april 22, 2020, looks like i'm going to post some more

Last edited by 098765432154321 (July 6, 2020 13:47:11)

deck26
Scratcher
1000+ posts

Removing punctuation marks

098765432154321 wrote:

whenclickeddeleteallofpunctuation marksadd.topunctuation marksadd?topunctuation marksadd,topunctuation marksadd!topunctuation marksadd"topunctuation marksadd:topunctuation marksadd;topunctuation marksadd'topunctuation marksadd-topunctuation marksadd/topunctuation marksadd...topunctuation marksadd(topunctuation marksadd)topunctuation marksset#to0askSentence?andwaitrepeatuntil#=lengthofanswer)change#by1addletter#ofanswertoletterssetpu#to0setpu#2to0repeatuntilpu#=lengthofanswerchangepu#by1repeatuntilpu#2=lengthofpunctuation markschangepu#2by1ifletterpu#ofanswer=itempu#2ofpunctuation marksthendeletepu#oflettersifletterpu#ofanswer=item9ofpunctuation marksthendeletepu#ofletterssetpu#2to0
hope this one works
That's far more complicated than is necessary though.

Set a variable ‘newversion’ to blank
loop through the input one letter at a time
either add the letter or something else to the end of ‘newversion’
end loop

No need for lists or multiple loops.
akr87
New Scratcher
3 posts

Removing punctuation marks

Thank you all for your help

Powered by DjangoBB