Fakultas Ilmu Komputer UI

Lab2_2_2_RulyAchmadGemilangGultom_1906399915.py 395 Bytes
Newer Older
Ruly Achmad Gemilang Gultom's avatar
Ruly Achmad Gemilang Gultom committed
1
2
3
4
5
6
7
8
9
10
11
import urllib.request

page = urllib.request.urlopen("https://skycruiser8.github.io/PF1Demo/")
text = page.read().decode("utf8")

google = input("cari kata didalam website tersebut: ")

if google in text:
    print("ada kata","'",google,"'","pada alamat https://skycruiser8.github.io/PF1Demo/")
else:
    print("tidak ada kata '",google,"' dalam kalimat https://skycruiser8.github.io/PF1Demo/ ")