Hello, Python!
Lecture 2
University of Arizona
INFO 511 - Fall 2024
“Python is the second best language at everything.” - Van Lindberg
Versatile and popular programming language with simple syntax
Large collection of frameworks and libraries
Large, active community
Widely used for web development, data analysis, artificial intelligence, scientific computing, and more.
Indentation for code blocks (instead of brackets)
Comments start with a #
(used to explain code)
Variables store data values.
Python uses integers (whole numbers), floats (non-whole numbers), strings (text), and booleans (true/false).
Date
2024-08-19
<class 'datetime.date'>
['__add__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__radd__', '__reduce__', '__reduce_ex__', '__repr__', '__rsub__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', 'ctime', 'day', 'fromisocalendar', 'fromisoformat', 'fromordinal', 'fromtimestamp', 'isocalendar', 'isoformat', 'isoweekday', 'max', 'min', 'month', 'replace', 'resolution', 'strftime', 'timetuple', 'today', 'toordinal', 'weekday', 'year']
if
, elif
, and else
for decision-making.for
and while
.Functions perform specific tasks.
Call a function with its name and arguments.
Python is a versatile and user-friendly language.
Ideal for beginners and widely used.
Encourages readable and maintainable code.
Extensive libraries and community support.
GitHub is the home for your Git-based projects on the internet – like DropBox but much, much better
We will use GitHub as a platform for web hosting and collaboration (and as our course management system!)
Just one option for now:
Sit back and enjoy the show!