SlideShare a Scribd company logo
1 of 1
sebelumnya ketikan
from string import *
def cari(kata):
b,g='',''
jumlah,him1=[],[]
j=-1
h=0
for e in kata:
if e not in punctuation:b+=e
else: b=b+' '
b=b.lower()
kata=split(b)
b=''
for i in kata:
if i not in b:b=b+i+' '
kata2=split(b)
kata2.sort()
for i in kata:
him=[]
for j in range(len(kata2)):
for h in range(len(kata)):
if kata2[j]== kata[h]:
him.append(h)
for j in kata2:
him1.append(kata.count(j))
e=0
hr=0
for e in range(len(kata2)):
if him1[e]==1:
g=kata2[e],him[hr]
hr+=1
else:
g= kata2[e],
for v in range(him1[e]):
g2= him[hr],
hr+=1
g=g+g2
jumlah.append(g)
abjad='abcdefghijklmnopqrstuvwxyz'
l=[]
hr1=0
for c in abjad:
h=[]
for i in range(len(kata2)):
if jumlah[i][0][0]==c:
h.append(jumlah[i])
if h:
l.append([c,h])
hr1+=1
for i in range(hr1):
print l[i]

More Related Content

What's hot

Addition and Subtraction of Functions
Addition and Subtraction of FunctionsAddition and Subtraction of Functions
Addition and Subtraction of Functionsjordhuffman
 
Day 5 examples u6w14
Day 5 examples u6w14Day 5 examples u6w14
Day 5 examples u6w14jchartiersjsd
 
Composite functions
Composite functionsComposite functions
Composite functionsShaun Wilson
 
J3 j3bu5t3r5
J3 j3bu5t3r5J3 j3bu5t3r5
J3 j3bu5t3r5gsantos15
 
Exercise 2
Exercise 2Exercise 2
Exercise 2math126
 
Mathematical preliminaries in Automata
Mathematical preliminaries in AutomataMathematical preliminaries in Automata
Mathematical preliminaries in AutomataMobeen Mustafa
 
The simplest existential graph system
The simplest existential graph systemThe simplest existential graph system
The simplest existential graph systemArmahedi Mahzar
 
Combined Functions
Combined FunctionsCombined Functions
Combined FunctionsJoviBerbz
 
Homework 1 of Optical Semiconductor
Homework 1 of Optical SemiconductorHomework 1 of Optical Semiconductor
Homework 1 of Optical SemiconductorLê Đại-Nam
 
Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14shumwayc
 
List comprehensions
List comprehensionsList comprehensions
List comprehensionsJordi Gómez
 
A Note on Latent LSTM Allocation
A Note on Latent LSTM AllocationA Note on Latent LSTM Allocation
A Note on Latent LSTM AllocationTomonari Masada
 
Operations on Functions
Operations on FunctionsOperations on Functions
Operations on Functionsswartzje
 
2.3 slopes and difference quotient t
2.3 slopes and difference quotient t2.3 slopes and difference quotient t
2.3 slopes and difference quotient tmath260
 

What's hot (20)

m.tech final
m.tech finalm.tech final
m.tech final
 
Addition and Subtraction of Functions
Addition and Subtraction of FunctionsAddition and Subtraction of Functions
Addition and Subtraction of Functions
 
Day 4 examples
Day 4 examplesDay 4 examples
Day 4 examples
 
Day 3 examples
Day 3 examplesDay 3 examples
Day 3 examples
 
Dwi putri erlinda saraswati
Dwi putri erlinda saraswatiDwi putri erlinda saraswati
Dwi putri erlinda saraswati
 
Day 1 examples
Day 1 examplesDay 1 examples
Day 1 examples
 
Day 5 examples u6w14
Day 5 examples u6w14Day 5 examples u6w14
Day 5 examples u6w14
 
Mtk3013 chapter 2-3
Mtk3013   chapter 2-3Mtk3013   chapter 2-3
Mtk3013 chapter 2-3
 
Composite functions
Composite functionsComposite functions
Composite functions
 
J3 j3bu5t3r5
J3 j3bu5t3r5J3 j3bu5t3r5
J3 j3bu5t3r5
 
Exercise 2
Exercise 2Exercise 2
Exercise 2
 
Mathematical preliminaries in Automata
Mathematical preliminaries in AutomataMathematical preliminaries in Automata
Mathematical preliminaries in Automata
 
The simplest existential graph system
The simplest existential graph systemThe simplest existential graph system
The simplest existential graph system
 
Combined Functions
Combined FunctionsCombined Functions
Combined Functions
 
Homework 1 of Optical Semiconductor
Homework 1 of Optical SemiconductorHomework 1 of Optical Semiconductor
Homework 1 of Optical Semiconductor
 
Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14
 
List comprehensions
List comprehensionsList comprehensions
List comprehensions
 
A Note on Latent LSTM Allocation
A Note on Latent LSTM AllocationA Note on Latent LSTM Allocation
A Note on Latent LSTM Allocation
 
Operations on Functions
Operations on FunctionsOperations on Functions
Operations on Functions
 
2.3 slopes and difference quotient t
2.3 slopes and difference quotient t2.3 slopes and difference quotient t
2.3 slopes and difference quotient t
 

Viewers also liked

กล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณ
กล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณกล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณ
กล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณSirirat Siriwan
 
Self Storage Mansfield
Self Storage MansfieldSelf Storage Mansfield
Self Storage Mansfieldmarkluise
 
Interval training pulsaciones y recuperación 1 (jesus)
Interval training pulsaciones y recuperación 1 (jesus)Interval training pulsaciones y recuperación 1 (jesus)
Interval training pulsaciones y recuperación 1 (jesus)lopez154
 
Temporalización general anual 3º eso 2013 2014
Temporalización general anual 3º eso 2013 2014Temporalización general anual 3º eso 2013 2014
Temporalización general anual 3º eso 2013 2014lopez154
 
1 hojas de registro cualidades físicas y sus métodos (jesus)
1 hojas de registro cualidades físicas y sus métodos (jesus)1 hojas de registro cualidades físicas y sus métodos (jesus)
1 hojas de registro cualidades físicas y sus métodos (jesus)lopez154
 
Revista diciembre 2013
Revista diciembre 2013 Revista diciembre 2013
Revista diciembre 2013 PA Montilla
 
Music video purposes work sheet
Music video purposes work sheetMusic video purposes work sheet
Music video purposes work sheetkendellburgess
 
презентация2
презентация2презентация2
презентация2nananano4ka
 
Porperty biz life
Porperty biz lifePorperty biz life
Porperty biz lifeompalsi
 
Oleh oleh khas kota solo
Oleh oleh khas kota soloOleh oleh khas kota solo
Oleh oleh khas kota soloayassaya
 
EPS Sales Brochure 2016
EPS Sales Brochure 2016EPS Sales Brochure 2016
EPS Sales Brochure 2016Matthew Devine
 
Can We Automate Predictive Analytics
Can We Automate Predictive AnalyticsCan We Automate Predictive Analytics
Can We Automate Predictive Analyticsodsc
 

Viewers also liked (16)

กล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณ
กล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณกล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณ
กล่องของขวัญของโค้ชชี่ โดย ศิริรัตน์ ศิริวรรณ
 
Self Storage Mansfield
Self Storage MansfieldSelf Storage Mansfield
Self Storage Mansfield
 
Interval training pulsaciones y recuperación 1 (jesus)
Interval training pulsaciones y recuperación 1 (jesus)Interval training pulsaciones y recuperación 1 (jesus)
Interval training pulsaciones y recuperación 1 (jesus)
 
Temporalización general anual 3º eso 2013 2014
Temporalización general anual 3º eso 2013 2014Temporalización general anual 3º eso 2013 2014
Temporalización general anual 3º eso 2013 2014
 
1 hojas de registro cualidades físicas y sus métodos (jesus)
1 hojas de registro cualidades físicas y sus métodos (jesus)1 hojas de registro cualidades físicas y sus métodos (jesus)
1 hojas de registro cualidades físicas y sus métodos (jesus)
 
Practica 5 Photoscape
Practica 5 PhotoscapePractica 5 Photoscape
Practica 5 Photoscape
 
1 Book kia11343380
1 Book kia113433801 Book kia11343380
1 Book kia11343380
 
Web tasarim
Web tasarimWeb tasarim
Web tasarim
 
Revista diciembre 2013
Revista diciembre 2013 Revista diciembre 2013
Revista diciembre 2013
 
Wilfredo_2015
Wilfredo_2015Wilfredo_2015
Wilfredo_2015
 
Music video purposes work sheet
Music video purposes work sheetMusic video purposes work sheet
Music video purposes work sheet
 
презентация2
презентация2презентация2
презентация2
 
Porperty biz life
Porperty biz lifePorperty biz life
Porperty biz life
 
Oleh oleh khas kota solo
Oleh oleh khas kota soloOleh oleh khas kota solo
Oleh oleh khas kota solo
 
EPS Sales Brochure 2016
EPS Sales Brochure 2016EPS Sales Brochure 2016
EPS Sales Brochure 2016
 
Can We Automate Predictive Analytics
Can We Automate Predictive AnalyticsCan We Automate Predictive Analytics
Can We Automate Predictive Analytics
 

Program python

  • 1. sebelumnya ketikan from string import * def cari(kata): b,g='','' jumlah,him1=[],[] j=-1 h=0 for e in kata: if e not in punctuation:b+=e else: b=b+' ' b=b.lower() kata=split(b) b='' for i in kata: if i not in b:b=b+i+' ' kata2=split(b) kata2.sort() for i in kata: him=[] for j in range(len(kata2)): for h in range(len(kata)): if kata2[j]== kata[h]: him.append(h) for j in kata2: him1.append(kata.count(j)) e=0 hr=0 for e in range(len(kata2)): if him1[e]==1: g=kata2[e],him[hr] hr+=1 else: g= kata2[e], for v in range(him1[e]): g2= him[hr], hr+=1 g=g+g2 jumlah.append(g) abjad='abcdefghijklmnopqrstuvwxyz' l=[] hr1=0 for c in abjad: h=[] for i in range(len(kata2)): if jumlah[i][0][0]==c: h.append(jumlah[i]) if h: l.append([c,h]) hr1+=1 for i in range(hr1): print l[i]