ZTM-TCPD-07

Run Settings
LanguagePython
Language Version
Run Command
# str # 'hi hello there' - a string with single quotes '' # "hi hello there" - a string with double quotes "" print(type("hi hello there")) username = 'supercoder' password = 'supersecret' long_string = ''' WOW O O --- ''' print(long_string) first_name = 'Andrei' last_name = 'Neagoie' full_name = first_name + ' ' + last_name print(full_name) # string concatenation - adding strings together print('hello' + ' Andrei') # print('hello' + 5) # only can concatenate to string, if not string -> error print(str(100)) # 100 is number int, str() will convert to string print(type(str(100))) # type convert 100 from int to a str print(type(int(str(100)))) # type convert 100 from int to a str to an int a = str(100) b = int(a) c = type(b) print(c) # Type Conversion print(100) print(type(100)) # Escape Sequence # weather = 'It's sunny' -- give error weather = "It's sunny" weather = "\t It\'s \"kind of\" sunny \n hope you have a good day!" # \ means to python intepreter that what comes after \ is a string # \' \" \\ \t (means add a tab) \n (means add a new line) print(weather)
Editor Settings
Theme
Key bindings
Full width
Lines