From 34a7673baacd8363b9fc07245c14279559b6aed8 Mon Sep 17 00:00:00 2001 From: Ki Ageng Satria Pamungkas Date: Sat, 25 Mar 2017 23:24:45 +0700 Subject: [PATCH 1/2] latihan done --- .idea/SG-Basic-Gen.03.iml | 12 + .../inspectionProfiles/profiles_settings.xml | 7 + .idea/misc.xml | 4 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 232 ++++++++++++++++++ DataLatihan/answer1.py | 9 +- DataLatihan/answer2.py | 12 +- 8 files changed, 285 insertions(+), 5 deletions(-) create mode 100644 .idea/SG-Basic-Gen.03.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/SG-Basic-Gen.03.iml b/.idea/SG-Basic-Gen.03.iml new file mode 100644 index 0000000..6f63a63 --- /dev/null +++ b/.idea/SG-Basic-Gen.03.iml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..c23ecac --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..70858da --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ecc1a96 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..3b7f861 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1490458146312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DataLatihan/answer1.py b/DataLatihan/answer1.py index ea4b036..deabe68 100644 --- a/DataLatihan/answer1.py +++ b/DataLatihan/answer1.py @@ -1,5 +1,5 @@ -data1 = "Data_1.txt" -data2 = "Data_2.txt" +data1 = "Data1.txt" +data2 = "Data2.txt" def readData(data1): x = [] @@ -7,3 +7,8 @@ def readData(data1): for line in data : x = line.split() return x +sensor =["I","and","The","you"] +kata = readData(data1) +kata = [x for x in kata if x not in sensor] +gabung = " ".join(kata) +print(gabung) \ No newline at end of file diff --git a/DataLatihan/answer2.py b/DataLatihan/answer2.py index 19d4180..7ca8470 100644 --- a/DataLatihan/answer2.py +++ b/DataLatihan/answer2.py @@ -1,9 +1,15 @@ -data1 = "Data_1.txt" -data2 = "Data_2.txt" +data1 = "Data1.txt" +data2 = "Data2.txt" def readData(data1): x = [] with open(data1) as data : for line in data : x = line.split() -return x + return x +kata1 = readData(data1) +kata2 = readData(data2) + +gabungan = [x for x in kata1 if x in kata2] +gabungan = " ".join(gabungan) +print(gabungan) \ No newline at end of file From 4ef9c04e198e05f8fcc55a67cc2b06febf04212e Mon Sep 17 00:00:00 2001 From: Ki Ageng Satria Pamungkas Date: Sat, 25 Mar 2017 23:57:14 +0700 Subject: [PATCH 2/2] all done --- .idea/workspace.xml | 295 +++++++++++++++++++++++++++++++++++++++++--- DataTugas/answer.py | 21 ++++ 2 files changed, 299 insertions(+), 17 deletions(-) create mode 100644 DataTugas/answer.py diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3b7f861..05c187f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,10 +1,7 @@ - - - - + @@ -113,6 +131,20 @@