This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
one = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
two = 2 | |
some_number = 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# booleans | |
true_boolean = True | |
false_boolean = False | |
# string | |
my_name = "RD Islam Nasim" | |
# float | |
book_price = 15.80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if True: | |
print("Hello Python If") | |
if 2 > 1: | |
print("2 is greater than 1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if 1 > 2: | |
print("1 is greater than 2") | |
else: | |
print("1 is not greater than 2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if 1 > 2: | |
print("1 is greater than 2") | |
elif 2 > 1: | |
print("1 is not greater than 2") | |
else: | |
print("1 is equal to 2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num = 1 | |
while num <= 10: | |
print(num) | |
num += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loop_condition = True | |
while loop_condition: | |
print("Loop Condition keeps: %s" %(loop_condition)) | |
loop_condition = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in range(1, 11): | |
print(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
classLinearSearch{ | |
static int search(int arr[], int n, int x) { | |
for (int i = 0; i < n; i++) { | |
if (arr[i] == x) | |
return i; | |
} | |
return -1; | |
} | |
} |