Thursday, December 4, 2014

Double dice roller/letter guesser

Connor Noble
AP Computer Science

This is the code I used for a dice roller that uses two dice.

It allows you to use different sized dice and not just 6 sided ones.  For this test I used normal 6 sided die.


















1.       Consider a string, tuple, and list of characters.

In []: a = 'acbde'
In []: b = ('a', 'b', 'c', 'd', 'e')
In []: c = ['a', 'b', 'c', 'd', 'e']

The values of a[3], b[3], and c[3] are all the same. In what ways are a, b, and c different?

They are different because 'b' can not be changed without changing the whole thing. 


2.      Why do computer programming languages almost always have a variety of variable types? Why can't everything be represented with an integer?

They have a variety of variables to make sure there is always a  solution to the problem.   Everything cannot be represented by an integer because then some equations would not work the right way.

tweet verify code


Connor Noble
AP Computer Science


 This code goes throught the "tweet" and if one thing is not included then it will not go through the code, but instead will stop and tell you if you arte missing something.  

1.       How many characters are in this sentence? Does it matter whether Python is storing the string as one byte per character or four bytes per character?

There are forty one characters in that sentence and it does not matter if because it is recognizing how many characters not bites.

2.      This question asks you about something you have not learned. In fact, the question is asking about details that go beyond what you will learn in this course. However, wondering what is going on at a lower level of abstraction – and talking about it – can be a useful strategy when learning about computing.

Describe what you think occurs in memory when the following code is executed.

In []: a = 'one string'
In []: b = 'another'
In []: c = a[:3] + ' and ' + b
In []: print(c[6:10])


First it stores 'one string' into a, 'another' into b, and a[:3] + 'and' + b. c would then equal "one and another". then c[6:10] is printed. That would be "d an".
 

Monday, November 10, 2014

Scratch man

Connor Noble, Tim Coon, Che Young

This is a version of pac-man using scratch the cat.







We began with a list of things that we could do. Then we cut out some that were to hard to do.  Eventually we came to Pac-man.  We then started creating the game, Tim made the art work for the characters and the food, Che created the map and player movement, I made the reset ability and the power ups.  it went together well.

We worked well together.  This was primarily because we communicated to each other on what we were trying to do  and got help from each other.

The game worked very well we only had some little bugs that were easily fixed.

We struggled with the ghost movement.  It ended up being random instead of fallowing the Cat.

We could of added more levels if we were given more time.

The Link:  http://scratch.mit.edu/projects/27387904/

Ghost Whack-A-Mole

Connor Noble



Ghost Whack-A-Mole





We began with a list of apps that we could do. Then we narrowed it down the a whack-a-mole type game.  we first started out with the title screen and then moved on to the playing screen.  After we finished the pictures we moved on to the programming aspect.  this took a little bit long because i didn't know how to incorporate a clock.

The team worked well together.  This was because we gave each other certain tasks to do and that's what we did.

Our app is trying to solve the problem of being bored and having nothing to do.  This app solves this problem by giving the user a game that never really ends so it can keep being played.

Our biggest problems in the coding was the clock and trying to get the ghost to appear.  we solved the clock by using the tutorial given on the website.  the ghost appearing was a little more difficult we had to go back and re-read the coding a lot until we understood what we did wrong and fixed it.




If we were given more time we could of improved the game.  We could of improved it by adding more themes to it instead of just having a Halloween themed one.  We could of also added more music and colored backgrounds.






https://drive.google.com/file/d/0B85_R3aDWla8YmxUMXRhZThlWjA/view?usp=sharing