Thursday, December 18, 2014

1.3.8 While Loops

While Loops

Number Guesser

Conclusion: 

1.) If you change between 1 and 20 from the previous program to between 1 and 6000, how many will you need to guarantee that you have the right answer?
           To guarantee that you have the right answer you will need 6000 because there are 6000 numbers one can guess so someone could guess every number except the right one, then the last guess would be the right one, which would add up to 600 guesses.

2.) Describe the difference between a while loop and a for loop.
            A for loop repeats a block of code for every time an event occurs. A while loop repeats a block of code so long as a condition remains true.

Friday, December 12, 2014

1.3.7 Loops

            Loops




           Lottery Ticket













             Hangman 














Conclusion

1.       Sometimes code using an iterative loop can be written without a loop, simply repeating the iterated code over and over as separate lines in the program. Explain the disadvantages of developing a program this way.

          Using "unrolled loops" has its disadvantages during development because it is very tedious work, boring, and its just really really inefficient. It would be a pain to change an unrolled loop of "for i range(10) to "for i range(1000)".


2.      Name a large collection across which you might iterate.

            A department store computer could iterate over a list of items in stock.


3.      What is the relationship between iteration and the analysis of a large set of data?

          Iteration reads and changes information about each item, where as data analysis only reads from them to get statistics. However both iteration and data analysis deal with large amounts of data.



Monday, December 8, 2014

1.3.6 Tuples and Lists

1.3.6 Tuples and Lists
Conclusion
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?
      
 The ways that a,b, and c are different is that a is a string, b is a tuple, and finally c is a list.


2.      Why do computer programming languages almost always have a variety of variable types? 

          Not everything can be answered with one variable type. For example, some situations require a true or flase statement whereas others require a number. These variables would have to be two different types.

3.Why can't everything be represented with an integer?

           Not all situations require an integer. Some require a true or false. Others require a float in that of a decimal places need to be accounted for.

Thursday, December 4, 2014

1.3.5 Strings

Strings

Tweet

Conclusion:
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 41 charactres in that sentence. Yes because unicode uses four bytes per character, and ASCII uses one byte per character. Unicode offers a wider range of characters.

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])

012345678901234           
one_and_another
dan
What occurs in this memory when this code is executed is first a equals the phrase ' one string '. Then, b equals the word another. Next c is going to equal the first 3 characters of a plus ' and' plus b. So c is going to end up equalling ' one _and_ another '. Lastly, the code is going to print the 6th character to the 10th character in c. But its not going to include the 6th and 10th character.


Thursday, November 20, 2014

Blown to bits chapter 2 questions


                           Blown to bits questions chapter 2:                                     

1.) Describe what a RFID is and also describe what it does?


2.) Determine how could a government could abuse RFID's and why it would be so easy for them to do so?


3.) If a document of some sort was printed from a laser printer, could that printer be classified through the document? If so, how?

4.) Create a scenario, other than embarrassment, where knowing what a customer is repeatedly buying is bad.

5.) What is the difference between "public" and "readily accessible"?

Monday, November 10, 2014

Spooky Ghost app

                             Spooky Ghost 


 Description: This is my app called "Spooky Ghost". What this app is made for is to jump scare you in the hope of that you wont get scared as easily anymore. What happens is that you open this app and get the home screen. Then you will click that button called "Start the spook" and then it will take you to the next screen. On this second screen you will play whac-a-mole with the mole being a ghost in a red circle. Every time you click the whac-a-mole it will add 1 to your score. Then when the jump scare part of the app happens it will switch to the terrifying picture on screen three. Then it will switch back to screen 2 and you will hit the reset button which will reset your score and then you will continue this process over and over till your tired of getting scared.
Reflection Questions:
1.) The creative process that my partners and I used was brainstorming. We all put ideas out there no matter how weird it sounded, we didn't judge and at the end of brainstorming we all picked one that we thought was the best.

2.)  What helped our team really work well together was keeping each other on task the whole time. Sometimes during class our group would get off task and would not work and not get anything accomplished.So we came up with a system to make sure that everyone would stay on task get their work done and finish the app. What we also did was divide up the work. For example I did the coding for the whac-a-mole  and the score bored, while Connor did the coding for the jump scare and then finally Matt did all the imaging.

3.) The problem that my app was trying to solve was the problem of being scared. My app does this by you playing whac-a-mole and then on random algorithms a very terrifying picture would pop up and try to scare you.

4.) 

This piece was the jump scare algorithim. What it did was at random algorithims from 1 to 100 it would pick a random integer between 1 and 100 and switch to screen three and show the scary picture to try and jump scare you. It was difficult because when we added this piece of code our app stopped working. We overcame this by playing around with it and being able to get the app to work.
This piece of code was to switch from screen one to screen two by clicking the button. It was difficult because at first we didn't know how to do it. Then we did some research, watched some tutorials, and was able to create this piece of code.

5.) Given more time to do this app  I could improve this app by giving it more options. For example like having an option for the volume and how fast the whac-a-mole portion of the app goes.

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

Thursday, October 16, 2014

Blown to bits response questions for chapter 1

Blown to Bits Response Questions:


  • Identify why people continue to improve the ways that technology and information are spread throughout the world. even though we are able to sustain ourselves as we are now?

People continue to improve our methods of spreading technology and information across the globe because we can. Not only can we, but to be able to do it faster, more efficiently, and generally better would be beneficial to everyone because it would make spreading the information easier. People like things when they are easy usually.
\
  • Determine the differences between information that is taken and reproduced by hand as opposed to information that is digitally reproduced and transferred to others.
Information reproduced by hand contains flaws because "To err is human" (6) and if humans are copying things, generally there will be an error somewhere. Digitally reproduced things, however are no where near as likely to contain errors. Bits are not flawed, and even if a bit or two gets corrupted, networks check to see if any bits were corrupted in transition and if they were the network will automatically repair them.
  • Debate why the spread of information was a positive impact for people or a negative impact.
In reality, it was, and is both. It was a positive in the fact that if a scientist in America makes an important discovery, it can be implemented in research in Europe as soon as the American scientist uploads his findings to the internet. The European scientists do not have to wait for written documents or the scientist himself to arrive in Europe. It is bad because data that could be protected by copyright could easily be plagiarized or pirated becuase every bit that made up the original song is the exact same as the bits that make up the copy.
  • Draw a graph of the way that the size of memory has changed over time.















----------------------------------------------------------------------------------------------------------------------------------

3.) I agree with the statement "computing will transform society". It has limited peoples personal privacy and will continue to do so in the future. "the data will be kept forever, unless there are policies to get rid of it. For the time being at least, the data sticks around" (11). This could be beneficial for documenting important discoveries in the future, but it has the potential to limit, if not end personal privacy. Everything someone does on the internet is monitored are stored away, along with any personal information that goes up there. If embarrassing or illegal photos are posted, this could ruin a persons chance of getting into certain colleges, and earning certain jobs. the more advanced computing technology becomes, the easier it will become for personal information and activity to wind up stored on the internet.

Wednesday, October 15, 2014

Blown to bit questions for chapter 1

Main Idea:
The unimaginable amount of data stored in the form of a bit, can be used in outstanding ways to change the world, whether for better or for worse.

Qusetions:
1.)    Name 3 things that can be made of bits. Ex: E-Mail
2.)    If bits, like ideas, are non-exclusive, and non-rivalrous, then ideas can be taken from one person and applied by another. Draw a conclusion on how could be a good thing, and how it could be a bad thing.
3.)    If 2,000,000,000,000,000,000,000 bit was the amount of data stored in 2007 then more data is probably being today. This includes everything on the internet from emails to bank transactions. Should the government have access to all this information or should there be restrictions in place? Justify your answer.

4.)    Determine whether this rapid change in technology is a good or bad thing. Do the pros outweigh the cons, or is it the other way around?

Tuesday, October 7, 2014

1.1.7 Scratch project

1.1.7 Scratch Project AP Computer Science


Nate Ibarluzea, Corey White, Jakeb Mitchell


My Team and I created an original game called:
               
                Nate The Ninja
              


                              Conclusion

1.) The creative process of using the scrum format was very useful. We were able to meet and discuss ideas and come up with some pretty good ideas. Then eventually we took all of our ideas and came up with a really good one. From there on each day we would have focus points and get those points done. So eventually we put our idea from our minds and paper into a scratch program and had an amazing game. This process was useful in the way that we got to discuss and really focus on teamwork to really come up with a very impressive game.

2.) What helped our team work well was that we didn't throw away any idea that one had. We never belittled someone for having a bad idea because there is no such thing as a bad idea. By using this we were able to work really well together and have no complications.

3.) What went well in this project was the teamwork. My team was able to work really well together and was very productive each and every class to be able to put our ideas to work and work together to make a quality game.

4.) What we struggled with was deciding if we were going to make the game retro or not. We were stuck between making it look like more modern or drawing the stuff and making our game original.

5.) How our team could improve our game is to make it harder for the ninja to score points because in the early levels he can just stand there for long periods of times and just pickpocket him without even the guard turning around. If we were to fix this problem our game would improve immensely.