Course Introduction

Install Python

Learn the Basics Through Visual Exercises

The Power of Functions

Project: Circle of Squares

Data Types (Let's Learn Some Adult Programming Stuff)

Conditionals and Control Flow

Exercises (a.k.a Drill and Kill)

Video and Written Solutions for Exercises

Project 2: Rock Paper Scissors

Interactive Exercises

- Functions start with
**def** - Don't forget your colons
- Always
**return**in functions rather than**print**!

Example Problem.

Write a function **add_two **that takes in two numbers as input and returns their sum.

## 24 comments

return(a*a)

How does Python know that

def test_square_number is a test of the square_number function and not a new function itself? Is it because assertions are running within it?

I also thought that 'test' might be a Python keyword but it isn't and I have yet to find a good explanation online.

a = int(num)

def square_number(a):

return a*a

print(square_number(a))

return a* a

print("You Code Is Correct")

print(square(10))

https://repl.it/FRpp/7

def error():

print("Error. Invalid input")

so you don't need to keep typing that out all over again [I'm just lazy :P])

Nice game great job!

return num*num

print(square_number(3))

squaredNumber = squaredNumber * squaredNumber

return squaredNumber

squared=number*number

return squared

print(square_num(4))

it's not printing your code is correct

squared=number*number

return squared

return number**2

print(square_number(number))

return a * a

IndentationError: unindent does not match any outer indentation level on line 25 test_square_number() ^ in main.py

heres my link in case you want to check it out: https://trinket.io/python/0c71971445

return number*number

print (square(2))

for i in range(12):

print(square(i))