Lecture 2 - Announcements / Notes

Announcements

From last time: How many ways can you write “Hello world”?

Note: you don’t yet know some of the syntax I’m using, but you will soon.

print("Hello world!")
print("Hello", "world!")
print("Hello", " ", "world", "!", sep="")
print("Hello world", sep=" ", end="!\n")
print("Hello world", end="!\n", sep=" ")
print("H", "e", "l", "l", "o", " ", "w", "o", "r", "l", "d", "!", sep="")
print("Hell", " w", "rld!", sep="o")

import sys
sys.stdout.write("Hello world!\n")

# and I could go on...

In teams: Write up your Exercise Solution Sets for E02T

How to succeed in this class

Problems - Live coding!