Skip to content

Errorld/learn_python_the_hardway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise 0: The Setup

Exercise 1: A Good First Program

Exercise 2: Comments And Pound Characters

Exercise 3: Numbers And Math

Exercise 4: Variables And Names

Exercise 5: More Variables And Printing

Exercise 6: Strings And Text

Exercise 7: More Printing

Exercise 8: Printing, Printing

Exercise 9: Printing, Printing, Printing

Exercise 10: What Was That?

Exercise 11: Asking Questions

raw_input("> ")

Exercise 12: Prompting People

Exercise 13: Parameters, Unpacking, Variables

from sys import argv
print argv
# [script, first, second, *]

Exercise 14: Prompting And Passing

Exercise 15: Reading Files

#pydoc file
type(f.read()) # <str>

Exercise 16: Reading And Writing Files

Exercise 17: More Files

Exercise 18: Names, Variables, Code, Functions

def function(*args, **kargs)
# args = (1,2,3,*)
# kwargs = {'x':1, 'y':2, *}

Exercise 19: Functions And Variables

Exercise 20: Functions And Files

file.seek(offset[i, whence]) # os.SEEK_SET, os.SEEK_CUR, os.SEED_END

Exercise 21: Functions Can Return Something

Exercise 22: What Do You Know So Far?

Exercise 23: Read Some Code

Exercise 24: More Practice

Exercise 25: Even More Practice

import ex25
def function():
    """help doc"""
if __name__ == "__main__"

Exercise 26: Congratulations, Take A Test!

Exercise 27: Memorizing Logic

Exercise 28: Boolean Practice

and>or

Exercise 29: What If

Exercise 30: Else And If

Exercise 31: Making Decisions

Exercise 32: Loops And Lists

Exercise 33: While Loops

Exercise 34: Accessing Elements Of Lists

Exercise 35: Branches and Functions

Exercise 36: Designing and Debugging

if:
    pass
else:
    die

Exercise 37: Symbol Review

del
with as
global
assert
yield
try except
exec
raise
finally
lambda

\a
\b
\f
\n
\r
\t
\v

%d
%i
%o
%u
%x
%X
%e
%E
%f
%F
%g
%G
%c
%r
%s
%%

;

Exercise 38: Doing Things To Lists

Exercise 39: Dictionaries, Oh Lovely Dictionaries

Exercise 40: Modules, Classes, And Objects

Exercise 41: Learning To Speak Object Oriented

random.shuffle()
random.sample()

Exercise 42: Is-A, Has-A, Objects, and Classes

Exercise 43: Gothons From Planet Percal #25

Exercise 44: Inheritance Vs. Composition

Exercise 45: You Make A Game

Exercise 46: A Project Skeleton

Exercise 47: Automated Testing

Exercise 48: Advanced User Input

Exercise 49: Making Sentences

Exercise 50: Your First Website

Exercise 51: Getting Input From A Browser

Exercise 52: The Start Of Your Web Game

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages