Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
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

m.tech final
m.tech finalm.tech final
Addition and Subtraction of Functions
Addition and Subtraction of FunctionsAddition and Subtraction of Functions
Addition and Subtraction of Functions
jordhuffman
 
Day 4 examples
Day 4 examplesDay 4 examples
Day 4 examples
jchartiersjsd
 
Day 3 examples
Day 3 examplesDay 3 examples
Day 3 examples
jchartiersjsd
 
Dwi putri erlinda saraswati
Dwi putri erlinda saraswatiDwi putri erlinda saraswati
Dwi putri erlinda saraswati
Dwi Putri Erlinda Saraswati
 
Day 1 examples
Day 1 examplesDay 1 examples
Day 1 examples
jchartiersjsd
 
Day 5 examples u6w14
Day 5 examples u6w14Day 5 examples u6w14
Day 5 examples u6w14
jchartiersjsd
 
Mtk3013 chapter 2-3
Mtk3013   chapter 2-3Mtk3013   chapter 2-3
Mtk3013 chapter 2-3
khairunnasirahmad
 
Composite functions
Composite functionsComposite functions
Composite functions
Shaun Wilson
 
J3 j3bu5t3r5
J3 j3bu5t3r5J3 j3bu5t3r5
J3 j3bu5t3r5
gsantos15
 
Exercise 2
Exercise 2Exercise 2
Exercise 2
math126
 
Mathematical preliminaries in Automata
Mathematical preliminaries in AutomataMathematical preliminaries in Automata
Mathematical preliminaries in Automata
Mobeen Mustafa
 
The simplest existential graph system
The simplest existential graph systemThe simplest existential graph system
The simplest existential graph system
Armahedi Mahzar
 
Combined Functions
Combined FunctionsCombined Functions
Combined Functions
JoviBerbz
 
Homework 1 of Optical Semiconductor
Homework 1 of Optical SemiconductorHomework 1 of Optical Semiconductor
Homework 1 of Optical Semiconductor
Lê Đại-Nam
 
Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14
shumwayc
 
List comprehensions
List comprehensionsList comprehensions
List comprehensions
Jordi Gómez
 
A Note on Latent LSTM Allocation
A Note on Latent LSTM AllocationA Note on Latent LSTM Allocation
A Note on Latent LSTM Allocation
Tomonari Masada
 
Operations on Functions
Operations on FunctionsOperations on Functions
Operations on Functions
swartzje
 
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
math260
 

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 Mansfield
markluise
 
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 2014
lopez154
 
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
 
Practica 5 Photoscape
Practica 5 PhotoscapePractica 5 Photoscape
Practica 5 Photoscape
Cristina Cantos Caravaca
 
1 Book kia11343380
1 Book kia113433801 Book kia11343380
1 Book kia11343380
Pariya Kiashemshaki
 
Web tasarim
Web tasarimWeb tasarim
Web tasarim
Celil Can
 
Revista diciembre 2013
Revista diciembre 2013 Revista diciembre 2013
Revista diciembre 2013
PA Montilla
 
Wilfredo_2015
Wilfredo_2015Wilfredo_2015
Wilfredo_2015
Wilfredo Aliaga
 
Music video purposes work sheet
Music video purposes work sheetMusic video purposes work sheet
Music video purposes work sheet
kendellburgess
 
презентация2
презентация2презентация2
презентация2
nananano4ka
 
Porperty biz life
Porperty biz lifePorperty biz life
Porperty biz life
ompalsi
 
Oleh oleh khas kota solo
Oleh oleh khas kota soloOleh oleh khas kota solo
Oleh oleh khas kota solo
ayassaya
 
EPS Sales Brochure 2016
EPS Sales Brochure 2016EPS Sales Brochure 2016
EPS Sales Brochure 2016
Matthew Devine
 
Can We Automate Predictive Analytics
Can We Automate Predictive AnalyticsCan We Automate Predictive Analytics
Can We Automate Predictive Analytics
odsc
 

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]