Catat_tampil 22.15 Add Comment Python Edit Python 14, simple project bot_name : str = 'Bob' print ( f 'Hello I \' m { bot_name } ! How can I assist you today?' ) while True : use... Read More
Catat_tampil 21.53 Add Comment Python Edit Python 13, import math import math import math as m from math import sqrt , tan print ( math . sqrt ( 3 )) print ( m . sqrt ( 3 )) print ( sqrt ( 3 )) pri... Read More
Catat_tampil 21.47 Add Comment Python Edit Python 12, exception #exception failed a , b = 10 , 'fifteen' print ( a + b ) #exception success a , b = 10 , 'fifteen' try : print ( ... Read More
Catat_tampil 21.32 Add Comment Python Edit Python 11, Comparison, ifelifels # #Comparison # a : int = 1 # b : int = 2 # print(a<b) # print(a<=b) # print(a==b) # print(a!=b) #ifelifelse user_input : str = ... Read More
Catat_tampil 21.26 Add Comment Python Edit Python 10, forloop, while # #success loop #for loop # for i in range(3): # print('Hello') # #penggunaan list dalam loop, success # names : list[str] = [... Read More
Catat_tampil 21.07 Add Comment Python Edit Python 9, func def func (): print ( 'Hello' ) func () func () # Pemanggilan utama untuk memulai eksekusi Read More
Catat_tampil 20.59 Add Comment Python Edit Python 8 Func def greet ( name : str , greeting : str )-> None : print ( f ' { greeting } , { name } !' ) greet ( name = 'Bob' ,... Read More
Catat_tampil 20.49 Add Comment Python Edit Python 7 Funct, 1 def add ( a : float , b : float ) -> float : print ( f 'Adding { a } + { b } ' ) return a + b print ( add ( a = 10 , ... Read More
Catat_tampil 20.49 Add Comment Python Edit Python 6 funct def add ( a : float , b : float ) -> float : return a + b print ( add ( a = 10 , b = 15 )) print ( add ( a = 15 , b = 30 )) Read More
Catat_tampil 20.34 Add Comment Python Edit Python 5, Data annotation var label, f string #Data annotation (anotasi data) adalah proses memberikan label, f string # data annotation age : int = 10 first_name : str = 'Bob... Read More
Catat_tampil 20.20 Add Comment Python Edit Python 4, convert #error #number = '100' #print(10 + number) #success number = '100' print ( 10 + int ( number )) #convert # int(number) #... Read More
Catat_tampil 20.09 Add Comment Python Edit Python 3, data type #data type #string text = 'apple' #integer number = 10 #decimal d = 10.5 d1 = - 10.5 #boolean b = True #dg T besar b1 ... Read More
Catat_tampil 19.14 Add Comment Edit Python 2, var, concat # asdfasfd # alksl name = 'Bob' print ( 'Hello,' + name + '!' ) print ( 'Hello,' + name + '!' ) Read More