Skip to content

Instantly share code, notes, and snippets.

# CS 1.1 - Code Quality, Reuse, & Error Handling code snippets
def foo(x):
y = 0
for z in x:
if z == 'e':
y = y +1
if y == 2:
return True
else:
@ibirnam
ibirnam / cs-1.1-01-snippets.py
Created August 12, 2019 15:49
code snippets used for the first class of CS 1.1
# CS-1.1 Variables, Function, and Program Design
def addTen(x):
plusTen = x + 10
return plusTen
print(addTen(4))
# 14
print(addTen(10))
print("hello world")