The complete python course ZTM

Run Settings
LanguagePython
Language Version
Run Command
print("Hello World!"); #operator precedence #() #** #*,/ #=,- # augmented assignment operator some_value = 5 some_value = some_value + 2 # short hand version some_value += 2 print(some_value) #type conversion print (type(str(100))) a = str(100) b = int(a) c = type(b) print(c) #escape sequence weather = '\t It\'s kind of sunny \n hope you have a good day' print(weather) #formatted strings name = 'Johnny' age = 55 print(f"hi{name}. You are {age}") #built in functions + methods(denote with a . after a particular type of data) quote = 'to be or not to be' print(quote.upper()) #Type conversion birth_year = int(input('what year were you born?')) age = 2023 - birth_year print(f'\n\tYour age is {age}') #list slicing (its mutable) use list slicing to copy a list vs modifying amazon_cart = ['notebooks', 'sunglasses','toys','grapes'] print(amazon_cart[0:1]) #Matrix matrix = [ [1,2,3], [4,5,6], [7,8,9] ] print (matrix[1][1]) basket = [a,b,c,d,e] #adding new_list = basket.extend([100]) print(basket) print(new_list)
Editor Settings
Theme
Key bindings
Full width
Lines