Skip to content

Commit af045b3

Browse files
authored
Merge pull request #38 from Kalaam-Programming-Language/v1.1.0-dev
V1.1.0 dev
2 parents e09d4a9 + 524a038 commit af045b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3575
-4705
lines changed

src/assets/git.png

7.69 KB
Loading

src/components/LearningMode.vue

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/exampleCodes/bintodec.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
7+
8+
export const bintodec = tW`
9+
Binary=1111
10+
11+
DecimalValue=0
12+
13+
length=Binary.संख्या()
14+
15+
दुहराओ x को Binary मे
16+
17+
{
18+
19+
length=length-1
20+
21+
BinaryCharacter=Binary[x]
22+
23+
value=BinaryCharacter*2**length
24+
25+
DecimalValue=DecimalValue+value
26+
27+
}
28+
29+
दिखाए(DecimalValue)
30+
31+
32+
33+
34+
`;

src/exampleCodes/calculatorEx1.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
const tW = (strings) => { return strings.map((s) => s.replace(/\s+/g, '\n')).join("").trim() }
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
27

38
export const calculator = tW`FirstValue=10
49
SecondValue=20
@@ -22,4 +27,4 @@ export const calculator = tW`FirstValue=10
2227
{
2328
output=FirstValue/SecondValue
2429
}
25-
दिखाए("Output is " + output)`
30+
दिखाए("Output is" + output)`;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
7+
8+
export const undefined1 = tW`
9+
a=10
10+
11+
c=a+b
12+
13+
दिखाए(c)
14+
15+
16+
17+
`;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
7+
8+
export const undefined2 = tW`
9+
10+
a=10
11+
12+
13+
c=b
14+
15+
दिखाए(c)
16+
17+
18+
19+
20+
21+
`;

src/exampleCodes/condition1.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
7+
8+
export const condition1 = tW`language='kalam'
9+
country='dcvdvdv'
10+
11+
12+
अगर(language=='kalam' || country=='india')
13+
{
14+
15+
16+
17+
दिखाए('That works too.')
18+
19+
20+
}
21+
`;
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
7+
8+
export const executionstack1 = tW`
9+
10+
x=11
11+
12+
y=11
13+
14+
ऑपरेशन='+'
15+
16+
अगर(ऑपरेशन=='+')
17+
18+
{
19+
20+
नतीजा=x+y
21+
22+
23+
}
24+
25+
अगर(ऑपरेशन=='-')
26+
27+
{
28+
29+
नतीजा=x-y
30+
31+
32+
}
33+
34+
अगर(ऑपरेशन=='*')
35+
36+
{
37+
38+
नतीजा=x*y
39+
40+
41+
}
42+
43+
अगर(ऑपरेशन=='/')
44+
45+
{
46+
47+
नतीजा=x/y
48+
49+
50+
}
51+
52+
53+
दिखाए( x + ऑपरेशन + y + '=' + नतीजा)`;

src/exampleCodes/factorialof.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
7+
8+
export const factorialOf = tW`
9+
factorialOf=5
10+
f=1
11+
count=1
12+
13+
अगर(factorialOf == 0 || factorialOf < 0){
14+
दिखाए("Invalid Input")
15+
}
16+
17+
जबतक(count < factorialOf+1){
18+
f=f*count
19+
count=count+1
20+
}
21+
22+
दिखाए("Factorial of" + factorialOf + " is " + f)
23+
24+
25+
26+
`;

src/exampleCodes/fibonacci.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const tW = (strings) => {
2+
return strings
3+
.map((s) => s.replace(/\s+/g, "\n"))
4+
.join("")
5+
.trim();
6+
};
7+
8+
export const fibonacci = tW`Fibonacci=[]
9+
दुहराओ a को (0,10) मे
10+
{
11+
अगर (a<3)
12+
{
13+
Fibonacci[a]=a
14+
}
15+
अगर (a>1)
16+
{
17+
x=Fibonacci[a-2]
18+
y=Fibonacci[a-1]
19+
Fibonacci[a]=x+y
20+
}
21+
}
22+
23+
दिखाए(Fibonacci)
24+
}
25+
26+
27+
`;

0 commit comments

Comments
 (0)