项目作者: cvython

项目描述 :
A working programming language made using Python!
高级语言: Python
项目地址: git://github.com/cvython/Vython.git
创建时间: 2021-05-20T06:10:00Z
项目社区:https://github.com/cvython/Vython

开源协议:MIT License

下载


Vython

Download & Setup

  • Clone the repo from Github:
    1. git clone https://github.com/cvython/Vython.git
  • Enter Into Its Derectory
    1. cd Vython
  • You’re All Set!

Running A Script

  1. $ python3 vython.py main.vo
  • The scripts’ file extension must be.vo
  • The scripts’ file extension can be anything from .txt to .vo! Though it is recommended to use the file extension .vo.

Usage

  • Print:
    1. show("Hello World")
  • Take Input:
    1. age = enter("Age: ")
  • Print Text And Variable:
    1. show("Age = "+age)
  • If Statements:
    1. if a > 18
    2. {
    3. show("Adult")
    4. }else
    5. {
    6. show("Child")
    7. }
  • If Statement With ‘and’:
    1. if a > 18 and a < 50
    2. {
    3. show("Adult, But Not Old")
    4. }
  • If Statement With ‘or’:
    1. if a > 18 || a > 16
    2. {
    3. show("Can Drive")
    4. }
  • Check If Variable A Particular Type:
    1. if canbe(a, "int")
    2. {
    3. show("Variable is an integer")
    4. }
  • Supported Variable Forms:
    • Integer ➡ int()
    • Float ➡ float()
    • String ➡ str()
    • List ➡ list[]
      • Select Cell From List:
        1. a = [0, 1, 2, 3, 4, 5]
        2. ## Show The First Cell
        3. show(a[0])
  • Supported Arethmetic Opperations:
    • Addition ➡ ‘+’
    • Subtraction ➡ ‘-‘
    • Division ➡ ‘/‘
    • Multiplication ➡ ‘*’
    • Remainder ➡ ‘%’

Credits

License

This Project is MIT Licensed