Tuesday, December 16, 2014

1.3.7 ForLoops

1.3.7 ForLoops







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 this method, the code is shorter that if you were to just repeat the code over and over. Also, the code is easier to understand if other people were to look at it.


2.      Name a large collection across which you might iterate.
 You might iterate and large amount of data, such as a long list of names, or the stock in the store.


3.      What is the relationship between iteration and the analysis of a large set of data?
Iteration changes the data as needed, but the analysis of data only looks over the data.


Wednesday, December 10, 2014

Activity 1.3.6 Tuples and Lists

Tuples and Lists
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 is a string, B is a tuple and C is a list. Strings are just something you type in and it can be anything as long as you have a ' before and after the string. a tuple is immutable, which means the values cannot be changed. A list can be changed, inserted, or deleted and lists are mutable.
2.  Why do computer programming languages almost always have a variety of variable types?  
Different situations call for a different usage of variable types. If you were doing any math, you wouldn't use a tuple because the values wouldn't change.
3.  Why can't everything be represented with an integer?
Everything can't be represented with an integer because tuples cannot take integeres, even though everything is stored as 1s and 0s. Some things you want to do require a string, like printing back a message, and that would be difficult trying to print a message only using 1s and 0s.

Thursday, December 4, 2014

Activity 1.3.5:Strings



Activity 1.3.5:Strings



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 characters in that sentence. it doesn't matters if Python stores a string as 1 byte or 4 bytes as.

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.
one and another
In []: a = 'one string'
In []: b = 'another'
In []: c = a[:3] + ' and ' + b
In []: print(c[6:10])

When this code is executed it will print 'd an' because of slicing. Slicing is when it takes a specific area of a desired string, and you can combine different strings to get a result.

Monday, November 10, 2014

APP


Notepad Extraordinaire 
Alex Place, Jack Tremblay, Xavier Vogel

Screen Shots








Features
  • Menu
  • Notepad
  • Wooer
  • Conversion Option
  • Checklist
Description
This app takes away problems that everyday people have. First, there is the main menu which has buttons to take you to the other features of the app. There is an option for a notepad, to record information that you need to remember, as well as a checklist so you can check off things that you needed to do. A conversion option allows you to convert between commonly used units, ex: Cm->In, Km->Mi, or Kg->Lbs. Those are just some of the options you can choose from. Another feature is a Wooer. This allows you to press a button and it gives you a randomly generated pick up line to use.



Reflection Questions:

1. Reflect on the creative process you used. What was useful? Discuss your reflection with your partner and then write a reflection individually.

  •   Brainstorming helped a lot because it got all of our ideas onto one page, and allowed us to pick and choose the best ideas and then pick the idea that we wanted to create an app about. In the end, we used several ideas in the app.

2. Reflect on the team dynamic. What helped the team work well together? Discuss your reflection with your partner and then write a reflection individually.

  • We worked well as a group to add on and improve the app. When one feature of the app was nearing completion, Xavior decided to take it upon himself to remake the whole app at his house, so me and Jack didn't have as much say in what the finished project looked like as we would've liked. The end product was very good however.


3. What Problem was your APP attempting to solve?  How well does it?

  • Our app solved many basic problems that people might encounter everyday. One of the features is a notepad, which allows people to record information to remember in the future. Another feature is the Conversion. This allows you to choose a conversion and plug in a number and it gives you the correct number in the right units.

4. Desribe the two hardest challenges you experienced when coding this app.  How did you overcome them.  Post a screen shot of these sections of code, and explain them.

  • One of the hardest challenges was figuring out the layout for the notepad. We had trouble finding the best way to lay it out, and how to code it so that the text box for the note would pop up after a long click.  Another challenge that gave us difficulty was simplifying the code instead of having it very complex. the code was getting very repetitive and lengthy. There was a lot of times that we had to hide everything on the screen but a few buttons or even a text box.


5. Given more time how could you improve your game?

  • If we would've had more time, we could improve on some designs and add more features to the app. we had a lot of good ideas that could have went into the app, but we ran out of time so we had to stick with the ideas that we thought were the best.

Wednesday, October 15, 2014



Scratch Game


Mountain Climber 

Alex, Jael, Brett

Produced a game that would be fun to play and appealing. The rules are simple, move using the arrow keys and avoid the rocks. If you get hit by a rock, you lose.
  • Link
    • http://scratch.mit.edu/projects/28795342/

  •     Reflect on the creative process you used. What was useful? Discuss your reflection with your partner and then write a reflection individually.   
    • We brainstormed and came up with many ideas, then we chose what we thought was the best and expanded upon that idea.
    • We next determined what the best way to tackle this idea would be, and who would do what part of the project.
  •  Reflect on the team dynamic. What helped the team work well together? Discuss your reflection with your partner and then write a reflection individually.
    • The thing that helped us was writing the team norms.  We knew what was expected and what to follow to get the best results. 
    • Another thing that helped was splitting up the work load into 3 parts and assigning each person something to work on individually, then all compiling it onto one file and making it work together.
  • What went well?
    • Working as a group 
    • Splitting up the work into 3 sections.
    • Making the project work on one file.
  • What did you struggle with?
    • Finding the right background to use so it didn't look out of place.
    • Making the rocks stop at the end when you get hit.
  • Given more time how could you improve your game?
    • Add more levels
    • Have the music speed correspond with the rock's speed
    • Have restrictions on movement of the climber in the X axis
    • Have special power that drop down with the rocks like a force field or a gun  to destroy the rocks.

Questions for Blown to Bits:


1. State how many bits were created and stored in 2007.


2. Predict what would happen if technology continued to advance at the rate it has been.


3. Determine 2 causes as to why technology has advanced so rapidly


4. Elaborate on how technology has bettered and worsened society.