Materi
First Program
2 Simple Operations
2 Comment
Slide 3
Slide 3 text
First Program
print( )
“Teks Anda”
Dalam bentuk teks,
harus ditutup dengan quotes (“)
jangan lupa ditutup
make tanda kurung ()
Cara memunculkan
di layar
Slide 4
Slide 4 text
print( )
“Hello world”
\n
sama fungsinya seperti enter
First Program
Slide 5
Slide 5 text
print( )
“Hello World”
\t
print( )
“Hei Kamu”
\t
sama fungsinya seperti tab
First Program
Slide 6
Slide 6 text
print( )
“Tanda Petik ”
\”
Untuk mengecualikan
First Program
Slide 7
Slide 7 text
print( )
’’’ ’’’
Docstring
docstring is magic
Bisa make petik satu (‘) atau petik dua(“””)
yang penting ada 3 tiap buka sama tutup
First Program
Slide 8
Slide 8 text
Materi
È First Program
2 Simple Operations
È Comment
Slide 9
Slide 9 text
Source : W3schools
Simple Operation
Slide 10
Slide 10 text
Simple Operation
Code Output
Slide 11
Slide 11 text
Materi
È First Program
È Simple Operations
9 Comment
Slide 12
Slide 12 text
Comment
#
# ’’’
’’’
”””
”””
Cara menambahkan komentar
Slide 13
Slide 13 text
Comment
Code
Output
Slide 14
Slide 14 text
Latihan Soal
Slide 15
Slide 15 text
Latihan Soal
Buatlah kode dengan output seperti ini
dan Jawablah pertanyaan berikut.
jangan lupa tambahkan komentar ya :)
Slide 16
Slide 16 text
Latihan Soal
Buatlah kode dengan output seperti ini
dan Jawablah pertanyaan berikut.
jangan lupa tambahkan komentar ya :)