Thursday, December 18, 2014

1.3.8 While loops


Conclusion 
1)     If you change between 1 and 20 from the previous program to between 1 and 6000, how many guesses will you need to guarantee that you have the right answer? Explain.
      You will need to have exactly 6000 guesses to assure that you undoubtably have the correct answer,
2)     Describe the difference between a while loop and a for loop.
      For loops repeats every time a specific event occurs, however while loops only repeat while a certian condition is true. The two can be used interchangibly based on your personal coding preferance.

Friday, December 12, 2014

1.3.7 For Loops


My code for the lottery and Mastermind:




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.

     By developing code without iterative loops in some scenarios may make writing the code much more simple, however it would not serve well in complex tasks. Having to rewrite the code several times over would take up much more space than needed, and would make the script much harder to read.

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

      Iteration is very in a variety of ways very useful. When having to loop, say 1000 times for a specific task it is much easier to just have a chunk of simple code that loops a program. Using a 'For' command or a 'While' loop accomplishes the task much faster, and with less work. 
3) What is the relationship between iteration and the analysis of a large set of data?
    Using Iteration you can very easily analyze two large sets of data, regardless of size and potentially compare, or contrast the two lists.

Thursday, December 4, 2014

1.3.6 Tuples and Lists

My Code For 15 and 16:

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?

                'a' uses a single string to hold of the letters. 'b' uses a tuple to contain all of the                  letters. 'c' uses a list to contain all of the values


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

                Representing everything with integers would make very large numbers. For                      example, representing the alphabet using binary, would leave 26 integers in a row to get        'Z'.

Tuesday, December 2, 2014

Conclusion Questions


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?

            42 Charactors. To me the amount of bytes per charactor is really unimportant. The only important thing is that the script functions properly.

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])
        
        I believe that the aboce code will pull out the first three characters of string 'a', add an ' and ' as well as placing string 'b' in the phrase. The new string: "C" will now read 'one and another'. The print will then type out charactor 6-10 from C saying: ''d an"

             

Code for "Tweet Eligability"

Task Description:
                A social media site offers a contest to write a humorous short paragraph. A constraint on the creative format: the entry must include a question, a quote, a compound sentence, and an exclamation. These would contain the characters ?, ", ,, and !, respectively.

Create a function how_eligible(essay) that returns 0 to 4, equal to the number of these four characters that the essay included. As pair programmers, generate ideas for how to solve this problem, strategize, and then code and test iteratively. 

My code:

Friday, November 21, 2014

Blown To Bits, Chapter 2.

Blown To Bits: Chapter 2

1) In the beginning of chapter two, it states that there are over half a million cameras spread across London. Debate the ethics of this setup. Is it fair that the government can track our every move? Does it infringe on your privacy?

2) What is a RFID chip? Describe what it does, and where it may be useful.

3) On page 36, it talks about Identity theft. Analyze the passage, and determine what you can do to help prevent the theft of your identity.

4) Summarize the bottom part of page 55. What is the author trying to say?

5) On page 68, the author states that "not even the most extreme measures will disconnect our digital selves from the rest of the world." Justify this statement by giving several examples. Also refute this claim, and give evidence why it may not be true.



Tuesday, November 4, 2014

Text Bombing App in MIT App Inventor

The Finished App.

Description:

This is meant to be a fun app in which you can send massive amounts of texts to a persons phone! Now you no longer have to type each individual message when your in a text bomb war! This app can send up too 500 SMS messages at once to any of your friends! Use the slider to adjust the amount of messages you'd like to send, type your message into the text box, and click send! boom! Instant Frustration!

Reflection Questions:

  • Our group used a very simple creative process. We just decided on the idea we wanted to focus on, brainstormed and figured out how the guts of the project would work. From there we went into development, working on a feedback loop to produce the final project.
  • Our team had a great dynamic. Ben functioned very well, using his phone to help us frequently test our app. Corey designed the final internal code of our app, and I worked on a separate app, trying to troubleshoot why our texting app did not work.
  •  Our app was not really trying to solve a problem. Instead we focused on something that would be fun to use, unique, and original.
Our Challenges:

  • The timer block creates a fluctuating random color chooser for the apps background
  • The address block selects the contact you want to target, and gets the phone number
  • The "Send: .click portion establishes the fundamental part of the app. Sending massive amounts of messages.
  • the "Number Of Messages" establishes a slider that determines the amount of messages you wish to send
  • One of our greatest challenges was trying to troubleshoot what was causing the "Run Time Error" in our app. It was causing our app to fail and no longer work. We determined that separate blocks were conflicting with each other, causing the app to crash
  • Another challenge in creating the app was simply getting the app to send messages. In our primary app, we went through several processes to get our app to work. In order to figure out what was wrong, our group had to set up various other apps to figure out how to send SMS messages
  • Given more time I think that we could improve the app to make the messages send much faster than they do.  

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




















Thursday, October 16, 2014

Response Questions: Blown To Bits

1) Three other things that can be made using bits are:

  • Word Documents
  • Websites
  • Algorithms
2) There are many reasons that this transfer of ideas could be good or bad. By exchanging ideas in insanely fast ways, this gives us a great advantage when doing research and development of new technology. It can be used in a bad way however; people can steal other peoples ideas using the worlds superhighway, and call them their own.

3) The government should have access to all of the information, so long as they are not allowed to release specific details of what they may find, unless it is evidence for a court case. The government does not care who, or what you are. They just want answers, and I think it is just to let them have access to the information. Anyway, if you don't like it, don't use a computer.

4) In such a technologically advanced word, I think that the presence of this technology is not quite good, or bad for society. In many ways I think it benefit life, and also hinder it. As for benefits, it makes doing research extremely easy, and is the fastest way to communicate information. It can also hinder us. It harms us because some people can find said information and use it in malicious ways. Overall, I think it's a neutral balance.

Wednesday, October 15, 2014

The world's technology is rapidly expanding. It all began with just one bit, and they now are great tools that can be used in many ways... Good or bad.

Questions:

  1.  Describe why do you think humans have the intense need to continue improving technology, even though we can easily sustain ourselves with what we already have?
  2. Compare the speed of data in computers, to the speed of our mail service.
  3. Elaborate on some of the great consequences of these technological advances. Why is it bad? What makes it good?
  4. Group in a small Venn Diagram the consequences of technology, the good the bad, and the neutral.

Tuesday, October 7, 2014

Scratch Game Project. *Finished*

        Our Scratch Project:





                Reflection:

  •         In this project we used the scrum method for our creative process. Overall I somewhat liked this method. It made for a good group dynamic. However, I felt like learning a whole new process so quickly, it was detrimental to the group.
  • Our team had a very good team dynamic. We worked well together thanks to the scrum method. We both took equal part in the creation of our game, and with minimal disagreements, it went very quickly.
  • One thing that went well was the documentation of the project. Phillip did very well creating the product backlog, and cataloging events. As we continued we also cataloged all of the past versions of our game
  • One thing we struggled with was the restrictions of scratch. Scratch, being a very elementary program, it made it very difficult to create such a complex program.If we had more time we could have implemented various other mechanisms to the game, For example, we could have added random power-ups that appear, and when activated they give u a movement boost


                Documentation:
                Scratch Game