diff --git a/00_Alternate_Languages/63_Name/MiniScript/README.md b/00_Alternate_Languages/63_Name/MiniScript/README.md new file mode 100644 index 00000000..819ecf50 --- /dev/null +++ b/00_Alternate_Languages/63_Name/MiniScript/README.md @@ -0,0 +1,21 @@ +Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html). + +Conversion to [MiniScript](https://miniscript.org). + +Ways to play: + +0. Try-It! Page: +Go to https://miniscript.org/tryit/, clear the sample code from the code editor, and paste in the contents of name.ms. Then click the "Run Script" button. Program output (and input) will appear in the green-on-black terminal display to the right of or below the code editor. + +1. Command-Line MiniScript: +Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as: +``` + miniscript name.ms +``` + +2. Mini Micro: +Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter: +``` + load "name" + run +``` \ No newline at end of file diff --git a/00_Alternate_Languages/63_Name/MiniScript/name.ms b/00_Alternate_Languages/63_Name/MiniScript/name.ms new file mode 100644 index 00000000..bb3d2da2 --- /dev/null +++ b/00_Alternate_Languages/63_Name/MiniScript/name.ms @@ -0,0 +1,25 @@ +print " "*34 + "Name" +print " "*15 + "Creative Computing Morristown, New Jersey" +print; print; print +print "Hello."; print "My name is Creative Computer." +name = input("What's your name (first and last)? ") + +s = "" +for i in range(name.len - 1) + s += name[i] +end for +print; print "Thank you, " + s + "." +print "Oops! I guess I got it backwards. A smart" +print "computer like me shouldn't make a mistake like that!"; print +print "But i just noticed your letters are out of order." +s = name.split("").sort.join("") +print "Let's put them in order like this: " + s +yn = input("Don't you like that better? ").lower +print +if yn and yn[0] == "y" then + print "I knew you'd agree!!" +else + print "I'm sorry you don't like it that way." +end if +print; print "I really enjoyed meeting you " + name + "." +print "Have a nice day!"