Code Monkey home page Code Monkey logo

wordyscript's Introduction

WordyScript

Compile pseudocode to JavaScript on the web!

WordyScript is a free educational tool that allows users who are unfamiliar with JavaScript or with programming in general to write pseudocode that will compile to JavaScript. With its intuitive, freeform, Python-like syntax and real-time compiling, WordyScript allows users to see a side-by-side comparison of how their code looks versus how the actual JavaScript would read, enabling them to learn JavaScript while coding.

WordyScript works by parsing the pseudocode input into Python code, and then converting the Python code into JavaScript using RapydScript, which is then run with a simple eval() function. The website enables the user to edit text to use as code in-browser through the use of CodeMirror. The back-end was made in Node.js.

Programmers: Jacob Edelman, Ben Edelman, Alok Tripathy, Aaron Berger

Sample Code

Factorial:

define a new function factorial of n
	if n equals 0
		return 1
	return n times factorial of (n minus 1)
print factorial of 4

Fibonacci:

new function fibonacci of n
    set i to 0
    set a to 0
    set b to 1
    set temp to 0
    as long as i is less than n
        increase i by 1
        set temp to a plus b
        set a to b
        set b to temp
    return b
print fibonacci of 15

Life, Universe, and Everything:

define new function lifeUniverseAndEverything of s
	let i be 0
	as long as i is less than s.length
		if s[i] is equal to 42
			return i;
		increase i by 1
	return -1

s = [1,23,4,2241,3,223,623,42,5,554,3634];
print lifeUniverseAndEverything(s)

wordyscript's People

Contributors

alokpathy avatar namlede avatar powerroff avatar yafahedelman avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.