Skip to content

minaghanna/kobe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Group 5 (5)

Kobe

Background

Welcome to Kobe. A Python-inspired (basically a black mamba) language that leverages the ease of JavaScript. Clean, efficient, readable code! Kobe Bryant easter eggs everywhere.

Features

Kobe’s key features include:

  • Static typing
  • Loops
  • Nesting
  • Type inference
  • Data structures such as arrays

Code Examples

Print

JavaScriptKobe
console.log("What’s up");
print("What’s up")

Functions

JavaScriptKobe
function add(a, b) {
  return a + b
}
num job add(num a, num b) {
  output a add b
}

Repeat

JavaScriptKobe

None

reps(5) {
  print("hello")
}

If-Statement

JavaScriptKobe
var championships = 100;
if (championships > 50) {
  console.log("You are Kobe")
}
num championships = 100
if (championships > 50) {
 print("You are Kobe")
}

For Loops

JavaScriptKobe
for (let i = 0; i < 10; i++) {
  console.log(i);
}
coil (num i, 0 to 9) {
  print(i)
}

While Loops

JavaScriptKobe
let x = 5;
while (x < 10) {
  console.log(i);
  x++;
}
grindUntil(x < 10) {
 print(x)
 x++
}

Arithmetic Operations

Addition

x add 6 adds 6 to the variable x.

Subtraction

x minus 6 subtracts 6 from the variable x.

Multiplication

x multiply 6 gets the product of 6 and x.

Division

x divide 6 gets the quotient of 6 and x.

Modulus

x mod 6 gets the remainder of x divided by 6.

Exponents

x to the 6 raises x to the 6th power.

Absolute value

abs (x) is the absolute value of x.

Square root

sqrt(x) gets the square root of x.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published