Skip to content

Commit a03d3ad

Browse files
committed
Update README.md
1 parent 139183b commit a03d3ad

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ Run either .bat (WINDOWS) or .sh(LINUX) to automatically execute the code and se
1515

1616
######Basic operations like +(addition), -(subtraction), *(multiplication), /(division)
1717

18-
######Data types and variables
18+
######Data types and variables (integer, float, string)
19+
20+
######Control Statements -> If-else
1921

2022
####Examples :-
2123

@@ -66,3 +68,43 @@ Run either .bat (WINDOWS) or .sh(LINUX) to automatically execute the code and se
6668
str=str*4
6769
println(str)
6870
Resutl :- hellohellohellohello
71+
####If-else : -
72+
73+
For integer and float -> ==,!=,>=,<=,>,<, null,!null
74+
For string -> null,!null,==,!= (memory reference)
75+
76+
null and !null
77+
78+
str="Hello"
79+
if str null:
80+
println("null")
81+
else: if str!null:
82+
println("not null")
83+
else:
84+
println("not deined")
85+
Result :- not null
86+
87+
>Basic if-else
88+
89+
a=4
90+
b=3
91+
if a>b:
92+
println(a)
93+
else:
94+
println(b)
95+
Result :- 4
96+
97+
>Nested If-else
98+
99+
a=4.5
100+
b=6.5
101+
if a>=b:
102+
if a==b:
103+
println(a)
104+
else:
105+
println(b)
106+
else: if a<b:
107+
println("B"+b)
108+
else:
109+
println("Not")
110+
Result :- B6.5

0 commit comments

Comments
 (0)