Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
1
Task/Variables/Ring/variables-1.ring
Normal file
1
Task/Variables/Ring/variables-1.ring
Normal file
|
|
@ -0,0 +1 @@
|
|||
<Variable Name> = <Value>
|
||||
16
Task/Variables/Ring/variables-2.ring
Normal file
16
Task/Variables/Ring/variables-2.ring
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
x = "Hello" # x is a string
|
||||
see x + nl
|
||||
x = 5 # x is a number (int)
|
||||
see x + nl
|
||||
x = 1.2 # x is a number (double)
|
||||
see x + nl
|
||||
x = [1,2,3,4] # x is a list
|
||||
see x # print list items
|
||||
x = date() # x is a string contains date
|
||||
see x + nl
|
||||
x = time() # x is a string contains time
|
||||
see x + nl
|
||||
x = true # x is a number (logical value = 1)
|
||||
see x + nl
|
||||
x = false # x is a number (logical value = 0)
|
||||
see x + nl
|
||||
6
Task/Variables/Ring/variables-3.ring
Normal file
6
Task/Variables/Ring/variables-3.ring
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
list = [1,2,3,"four","five"]
|
||||
list2 = list
|
||||
list = []
|
||||
See list # print the first list - no items to print
|
||||
See "********" + nl
|
||||
See list2 # print the second list - contains 5 items
|
||||
2
Task/Variables/Ring/variables-4.ring
Normal file
2
Task/Variables/Ring/variables-4.ring
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<NUMBER> + <STRING> --> <NUMBER>
|
||||
<STRING> + <NUMBER> --> <STRING>
|
||||
5
Task/Variables/Ring/variables-5.ring
Normal file
5
Task/Variables/Ring/variables-5.ring
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
x = 10 # x is a number
|
||||
y = "20" # y is a string
|
||||
sum = x + y # sum is a number (y will be converted to a number)
|
||||
Msg = "Sum = " + sum # Msg is a string (sum will be converted to a string)
|
||||
see Msg + nl
|
||||
Loading…
Add table
Add a link
Reference in a new issue