CDAT - Computer Science‎ > ‎2015-16‎ > ‎CSP‎ > ‎News and Assignments‎ > ‎

6-7 OCT

posted Oct 6, 2015, 4:45 AM by Tom Culpepper   [ updated Oct 8, 2015, 3:31 AM ]
We're being asked to provide our computer lab as testing space on the 7th and 8th.  This will change our schedule a little bit.

6 OCT, B day - Functions in python
We'll learn how to use 'def' to create a function in python.  We'll look at how this can be used to save us from type repetitive code.

7 OCT, A day - carnival game demo day
We will be meeting in room # _____.  You will demo your games and get feedback from others.

8 OCT, B day
We will be meeting in room # _____.  You will demo your games and get feedback from others.

9 OCT, A day
We'll learn how to use 'def' to create a function in python.  We'll look at how this can be used to save us from type repetitive code.


copy/paste the following code for later in class.
def askQuestion (question, answer):
    #your code goes here
    
askQuestion("What is the capitol of France?", "Paris")
askQuestion("What is 9 + 10?", "19")
askQuestion("What is 5 to the zero power?", "1")


""" Here's what we'll do with this...
1)  add code to the askQuestion function. It should
say print the question to the screen and check if
the user put in the right anwer.  If they got it 
right it should say 'good job' if they got it wrong
it should tell them 'no, that's wrong.'


2) add scoring.
Comments