Git Product home page Git Product logo

fioi-blockly's Introduction

France-IOI Blockly additions

Additions and changes to Blockly for France-IOI.

Requirements

Requires buttonsAndMessages from bebras-modules for variable prompts.

Block text_eval requires acorn and the associated utility acorn-walk; they're both available in the bebras-modules repository as well.

Usage

Include the file dist/fioi-blockly.min.js after including Blockly javascript files, and before using Blockly.

If you modify the source, launch the command gulp to recompile.

Additions

Dicts blocks

Blocks to handle dictionnaries.

  • Block dict_get: set element at index
  • Block dict_get_literal: set element at index
  • Block dict_keys: get the list of keys
  • Block dicts_create_with: create a dictionnary

Tables blocks

Blocks to handle 2D and 3D tables.

Inputs blocks

Blocks to handle inputs from stdin.

  • Block input_num: read an integer
  • Block input_char: read a single character
  • Block input_word: read a word (delimited by whitespaces)
  • Block input_line: read a line

Other blocks

  • Block lists_append: append an element to a list
  • Block text_print_noend: print some text without a newline at the end
  • Block text_eval: allow user to input an expression to be evaluated, for instance list[x+2]*5

Changes

Blocks

  • Block logic_compare: use the standard notations for blocks instead of special characters (for instance, != instead of โ‰ )

Variables

  • Allow only names starting with [a-zA-Z_].
  • Default name: "element"

Generation

  • Repeat blocks: start with 0
  • Python procedures: stop global variables

fioi-blockly's People

Contributors

mblockelet avatar hsermeno avatar zgtm avatar

Watchers

James Cloos 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.