-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88313c7
commit 026670b
Showing
13 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#1,3,5,7,9 | ||
for i in range(10,0,-2): | ||
print("i ",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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
week_days =["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Sat"] | ||
day_of_week = int(input("Enter day of the week ")) | ||
print("Day of the week ", week_days[day_of_week]) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
my_dict = {"user1":"Aung Aung","user2":"Maung Maung"} | ||
|
||
for i in my_dict: | ||
print("Item ", i) | ||
|
||
for key,value in my_dict.items(): | ||
print("Key=> ",key, " value =>",value) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
my_list = [10,20,30,40] | ||
|
||
for i in my_list: | ||
print("I is ",i) | ||
i *= 2 | ||
|
||
for i in range(len(my_list)): | ||
print("Item ",my_list[i]) | ||
my_list[i] = my_list[i] * 2 | ||
|
||
print("My list ",my_list) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
myanmar = float(input("Enter mark for myanmar ")) | ||
english = float(input("Enter mark for english ")) | ||
math = float(input("Enter mark for math ")) | ||
|
||
pass_mark = 40 | ||
if myanmar >= pass_mark and english >= pass_mark and math >= pass_mark: | ||
print("Pass the exam") | ||
else: | ||
print("Fail") | ||
|
||
print("Code end") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
myanmar = float(input("Enter mark for myanmar ")) | ||
english = float(input("Enter mark for english ")) | ||
math = float(input("Enter mark for math ")) | ||
|
||
if myanmar < 40 or english < 40 or math < 40: | ||
print("Fail") | ||
else: | ||
print("Pass") | ||
|
||
print("Code end") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
myanmar = float(input("Enter mark for myanmar ")) | ||
english = float(input("Enter mark for english ")) | ||
math = float(input("Enter mark for math ")) | ||
|
||
if myanmar >= 40: | ||
if english >= 40: | ||
if math >= 40: | ||
print("Pass ") | ||
else: | ||
print("Fail") | ||
else: | ||
print("Fail") | ||
else: | ||
print("Fail") | ||
|
||
print("Code end") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
number_of_subject = int(input("Enter number of subject ")) | ||
#marks = [] | ||
|
||
pass_mark = 40 | ||
isPass = True | ||
|
||
for i in range(number_of_subject): | ||
mark = float(input("Enter mark for subject "+str(i)+" ") ) | ||
isPass = isPass and mark >=40 | ||
|
||
if isPass: | ||
print("Pass the exam ") | ||
else: | ||
print("Fail the exam") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
my_list = [1,2,3,4] | ||
|
||
for i in my_list: | ||
print("Item ",i) | ||
if i==13: | ||
break | ||
else: | ||
print("for complete normally") | ||
print("end of loop") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
str = "Hello" | ||
|
||
for i in str: | ||
print("Char ",i) | ||
|
||
print("End of loop ",i) | ||
|
||
my_list = ["one","two","three","four","five"] | ||
|
||
for item in my_list: | ||
print("Item ",item) | ||
|
||
my_dict = {"1":"Red","2":"Green",3:"Blue"} | ||
|
||
for item in my_dict: | ||
print("Item in dic ",item) | ||
|
||
my_set = ("Orange","Banana","Apple") | ||
|
||
for item in my_set: | ||
print("Item ",item) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") | ||
print("Hello World") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
print("Range ", range(3)) | ||
|
||
for i in range(3): | ||
print("Hello ",i) | ||
print("World ") | ||
|
||
print("End of loop ",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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
if "Hello": | ||
print("Hello") | ||
print("Code end") | ||
|
||
str = '' | ||
if str: | ||
print("Cannot see this") | ||
else: | ||
print("Will print this") |