QB64 Phoenix Edition
Funny Random Sentence Generator - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7)
+---- Thread: Funny Random Sentence Generator (/showthread.php?tid=725)



Funny Random Sentence Generator - SierraKen - 08-04-2022

I believe there's 79 different variations of sentences than can be made with this. Possibly more. Most of it is very bad grammar lol. But try to look over that if you can. I'm just having some fun. I added mouse support to left click for another sentence. If you right click it ends. Tell me what you think, thanks. I'm no English professor lol. It's more of a poetry-type of writing or something like the start of a haiku almost, in one sentence. 

Code: (Select All)
Dim a$(22)

start:
Cls
Print "                             Random Sentence Generator"
Print
Print "                                   By SierraKen"

Randomize Timer

Print: Print
a = Int(Rnd * 22) + 1
For aa = 1 To 22
    Read a$(aa)
    If aa = a Then Print a$(aa);
Next aa

a = Int(Rnd * 22) + 1
For aa = 1 To 22
    Read a$(aa)
    If aa = a Then Print " " + a$(aa);
Next aa

a = Int(Rnd * 7) + 1
For aa = 1 To 7
    Read a$(aa)
    If aa = a Then Print " " + a$(aa);
Next aa

a = Int(Rnd * 12) + 1
For aa = 1 To 12
    Read a$(aa)
    If aa = a Then Print " " + a$(aa);
Next aa

a = Int(Rnd * 4) + 1
For aa = 1 To 4
    Read a$(aa)
    If aa = a Then Print " " + a$(aa);
Next aa

a = Int(Rnd * 5) + 1
For aa = 1 To 5
    Read a$(aa)
    If aa = a Then Print " " + a$(aa);
Next aa

a = Int(Rnd * 7) + 1
For aa = 1 To 7
    Read a$(aa)
    If aa = a Then Print " " + a$(aa);
Next aa

Locate 22, 1
Print "Click left mouse button for another one."
Print "Click right mouse button to quit."
Do
    While _MouseInput: Wend
    mouseLeftButton = _MouseButton(1)
    mouseRightButton = _MouseButton(2)
    Clear_MB 1
    If mouseLeftButton Then Restore: GoTo start:
    If mouseRightButton Then End
Loop

Data "He","She","I","You","Animals","People","They","Birds","Dogs","A dog","A cat","Cats","A bird","Fish","A fish","Squirrels","A squirrel","Chipmunks","A chipmunk","Crowds","A crowd","A person"

Data "hit","ran","hunted","looked","walked","roamed","journeyed","swam","read","programmed","typed","laughed","listened","flew","ate","drove","bit","smiled","chewed","stared","yawned","slept"

Data "to","until","when","more to","less to","faster to","slower to"

Data "Lucy","Edward","Ralph","Cindy","people","they","a woman","a man","a kid","animals","they","someone"

Data "but","or","as if","and when"

Data "saw","looked","ignored","yelled","talked"

Data "to nothing.","to a star.","to another person.","to themself.","to nobody.","to everyone.","to the world."

Sub Clear_MB (var As Integer)

    Do Until Not _MouseButton(var)
        While _MouseInput: Wend
    Loop

End Sub 'Clear_MB



RE: Funny Random Sentence Generator - BSpinoza - 08-04-2022

In this way you can make a Poem / Haiku -Generator!

https://www.poem-generator.org.uk/haiku/


RE: Funny Random Sentence Generator - jessica86 - 09-12-2024

A funny random sentence generator is an excellent instrument for encouraging creativity and fun! Unexpected word combinations might make your day better by providing a little inspiration and comedy when you need it.


RE: Funny Random Sentence Generator - Pete - 09-12-2024

Or you can make a list of all the swear words in America, build a time machine, and use the program to write a comedy bit for George Carlin, back in the 1970's. Just sayin'

Pete


RE: Funny Random Sentence Generator - bplus - 09-12-2024

This is one area where computer generated text far outshines printed text.

It is also a lead into AI. Given a sentnce structure and a proper substitution system of words you can come up with all sorts of stuff sounding quite intelligent. Imagine tying in logic and propositions and using Internet to gather data... you can be replaced, maybe sooner than we think?


RE: Funny Random Sentence Generator - DANILIN - 09-12-2024

Program should generate a file

and a dozen phrases at once

open "Sentence.txt" for append as #1
d$=""

7 times at ends of lines
: d$ = d$ + " " + a$(aa)

? #1, d$

It definitely works for me

 Squirrels walked to they but looked to everyone.
 They ran less to a woman or saw to another person.
 A cat smiled until animals as if ignored to everyone.
 Chipmunks stared when Edward and when yelled to nobody.
 A crowd programmed to Edward as if saw to nothing.
 Animals journeyed less to animals but looked to everyone.