In Chapter one i learned about the basics of java. i learned that when setting a value to a letter you must tell the program what type of value it is. i learned how to fix a program from the "99 Bottles of Beer" activity.
^^^ This is was the code I used to produce the results that are shown to the right. I was given a broken code that i had to fix. I used trial and error after i looked through the code to see what may be causing the error. At first it did not loop around like it should. I changed around the code to make it loop untill it got to the last bottle. The only problem then was the line that said "1 bottles of beer on the wall". To fix that i had to add another if else stament. This made it so that when beernum == 1 it would change the whole line. With that I gad to add to the > in the if statment above the one i made so that they will not both run at the same time.
Connornoble-APcomp.science
Tuesday, January 13, 2015
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.
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
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".
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/
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
https://drive.google.com/file/d/0B85_R3aDWla8YmxUMXRhZThlWjA/view?usp=sharing
Subscribe to:
Posts (Atom)