michael at Catalina-Pro in ~/Dropbox/Projects/cs88/cs88/src on master [?] 👉 python3 Python 3.8.7 (default, Dec 30 2020, 10:13:08) [Clang 12.0.0 (clang-1200.0.32.28)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> >>> >>> 1 + 2 3 >>> "Hello, " + "CS88!" 'Hello, CS88!' >>> class_name = 'CS88' >>> class_name 'CS88' >>> 'Hello, ' + class_name + '!' 'Hello, CS88!' >>> x = 5 >>> y = 3 >>> max(x, y) 5 >>> help Type help() for interactive help, or help(object) for help about object. >>> help() Welcome to Python 3.8's help utility! If this is your first time using Python, you should definitely check out the tutorial on the Internet at https://docs.python.org/3.8/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam". help> You are now leaving help and returning to the Python interpreter. If you want to ask for help on a particular object directly from the interpreter, you can type "help(object)". Executing "help('string')" has the same effect as typing a particular string at the help> prompt. >>> >>> >>> help(max) Help on built-in function max in module builtins: max(...) max(iterable, *[, default=obj, key=func]) -> value max(arg1, arg2, *args, *[, key=func]) -> value With a single iterable argument, return its biggest item. The default keyword-only argument specifies an object to return if the provided iterable is empty. With two or more arguments, return the largest argument. >>> max(x, y, 10, 1, 12, 20) 20 >>> help(max) Help on built-in function max in module builtins: max(...) max(iterable, *[, default=obj, key=func]) -> value max(arg1, arg2, *args, *[, key=func]) -> value With a single iterable argument, return its biggest item. The default keyword-only argument specifies an object to return if the provided iterable is empty. With two or more arguments, return the largest argument. >>> >>> >>> >>> x 5 >>> if x < 10: ... print('X is small') ... else: ... print('X is big') ... X is small >>> x < 10 True >>> if x % 2 == 0: ... print('x is even') ... else: ... print('x is odd') ... x is odd >>> x % 2 1 >>> 1 == 0 False >>> x = 5 >>> if x < 5: ... print(x) File "", line 2 print(x) ^ IndentationError: expected an indented block >>> if x < 5: ... print('X is less than 5') ... >>> x < 5 False >>> >>> >>> >>> def greet(name): ... return 'Hello, ' + name + '!' ... >>> greet('CS88') 'Hello, CS88!' >>> greet('Matt') 'Hello, Matt!' >>> greet('Shreya') 'Hello, Shreya!' >>> def my_max(x, y): ... if x > y: ... return x ... else: ... return y ... >>> my_max >>> my_max(x, y( ... KeyboardInterrupt >>> my_max(x, y) 5 >>> if x > 4: ... print(x) ... else: ... print('x is big') ... print(x) ... 5 >>> my_max(x, y) 5 >>> x 5 >>> y 3 >>> x = 5 >>> y= 3 >>>