University project.
Clone this repo.
Make sure you have python
installed.
Use pip to install the requirements:
pip install -r requirements.txt
Run the flask application.
flask run --reload
cd frontend
npm install
npm run dev
program programa;
var string x = "Hello";
function a<float>(float f, float z){
return f;
};
main(){
var string y = " World";
var float a = hola(20.0, 5.0);
var bool z = True;
if(z){
print(a);
}else{
print(x + y);
}
var int i = 0;
while(i < 3){
print("test");
i = i + 1;
}
i = 0;
var int b[10];
while(i < 10){
a[i] = i * 2;
i = i + 1;
}
print(a[1], a[2], a[3]);
sort(a, >);
print(a[1], a[2], a[3]);
print(find(a, 4));
};
Int Numbers without decimals.
Float Numbers with decimals.
String Text inside " "
Bool True, or False
Declare before other functions.;
var string m = "Hello";
Declare before main function, and after global variables. Acceptable return types:
Int
Float
String
Bool
Void
function ID<type>(type param_1, type param_2){
return return_value;
};
if(condition){
...
}
if(condition){
...
}else{
...
}
+
, -
, /
, *
<
, >
, ==
, !=
, <=
, >=
Execute code while condition is true.
while(condition){
...
}
var type ID = var_value;
var type ID[INT];
print(value);
read(x);
Get the absolute value.
absolute(x);
Get the square root.
sqrt(x);
Get the integer part of a number.
trunc(x);
Get the string in lower case.
toLower(x);
Get the string in upper case.
toUpper(x);
Get a substring of a string.
subString(x, start, end);
Get the average of a list of numbers.
avg(x);
Sort a list of numbers.
sort(x, >);
sort(x, <);
Returns the index of a number in a list.
find(x, number);
Get the max value of a list of numbers.
max(x);
Get the min value of a list of numbers.
min(x);
Get the sum of a list of numbers.
sum(x);
Get the length of a list of numbers.
len(x);