Monday, December 15, 2014

1.3.6



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? 
Strings can be printed and concatenated as a standard string.
Tuples can be appended and store different string lengths in each element.
A list of characters can only be read from.
2.  Why do computer programming languages almost always have a variety of variable types?    
Languages have different variable types because different variables' contents are incompatible by nature.
3.  Why can't everything be represented with an integer?
Technically speaking, everything COULD be represented as integers since computers store everything as 1s and 0s. But it would be difficult and inefficient.

Friday, December 5, 2014

1.3.5

Goals
    • No More then 140 Characters
    • That the following Characters were used ( ,  "  !  ?)
Code

def eligible(essay):
    a=0
    if len(essay)<=140:
        a+=1
    else:
        print ("Your essay is to long! It must be shorter than 140 characters!")
    if '?' in essay:
        a+=1
    else:
        print ("Your essay needs a question(?)!")
    if '"' in essay:
        a+=1
    else:
        print ("Your essay needs a quote("")!")
    if ', and' or ', or' or ', but' in essay:
        a+=1
    else:
        print ("Your essay needs a compound sentence(, and/, or/, but)!")
    if '!' in essay:
        a+=1
    else:
        print ("Your essay needs an exclaimation(!)!")
    if a==5:
        print ("Thank You! Your essay has been submited.")
    else:
        print ("Please fix your essay and resubmit it.")


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?
41 characters are in this sentence. Yes it matters, because it will take up four times more space

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


 a and b are saved in the code and c is defined as a[:3] + 'and' +b. When these variables are called, the code will take what is defined and use it for the variables.

Wednesday, November 5, 2014

Blown to Bits: Chapter 2 Questions

1) How many cameras per persons are there in London?

2) How do you feel about the amount of info that is stored (purchases, locations, conversations, ex. (basically any thing that has any thing to do with electronics and some other things))? Do you think this is OK?

3)Do you think there needs to be more privacy laws? Do you think that the "agreement statements" should put that "they have the right to use you information for what ever they want" at the top of the 5000 word agreements (that nobody reads) instead of buried in the middle?

4) Based on the teenagers you know, do you think more than, about, or less than 55% of teenagers use/have a social media account (Facebook, ex)?

5) Have you ever spied/stalked someone on the internet?

6) What do you think about the idea of tagging people with RFIDs?

David T
$wagulator- Tip and Tax Calculator

1) When we were brainstorming ideas for the app, we thought of what we would find useful to have on our smartphone, and would solve a problem. This was useful because we found a problem that could be solved by an app.
2)I think that Anthony, Eric, and I worked very well together. We solved all of our problems and accomplished our goals.
3) We decided that our app should be a calculator for calculating the tax and tip, so before you order a meal, you know how much you will be spending in total.
4)
     a. The first problem we faced while coding was making certain elements of the screen hidden at certain points in the program. This was a tedious task because small errors in the code could set the whhole program off, and their was a lot of this type of code.
     b. The second problem was displaying the correct calculated values in the correct place. We overcame this problem by creating algorithms for calculating the values of all five variables. These were then displayed by setting the text of empty text boxes to the correct rounded answer.

5) If we had more time, we could have added more features to the calculator. 

Tuesday, October 14, 2014

Blown to Bits Chapter1 Answers

Questions:

1.) Classify what makes a "Bit"
2.)Compare physical and digital processes needed to accomplish a task
3.)State how you feel about the idea of things such as SSN, Medical Information and Birth Records stored forever unless there are policies to get ride of it.
4.) Determine whether or not the rapidly advancing technology is good for humans.

Answers:
  1. Bits are the zeros and ones that make up all digital programs a pictures and messages.
  2. Physical processes require more work and physical labor and may need to be repeated over and over. Digital processes require more thought than labor and once done can be use over and over, it doesn't need to be made again as with most physical processes.
  3. I think that in some ways it could be useful; but for the most part I think it is a waste of space to keep it all, yet a waste of time to delete it all.
  4. I think that it is good because it can make our lives better and make use more connected and it keeps the economy up. On the other hand it causes tons of waste and also by the time you learn half of the things you can do with your devices, the device is three generations old.

Blown to Bits Chapter1 (Questions)

Define: ubiquitous information.

What are some positives and negatives of internet privacy?

Do you think there needs to be more or less privacy and privacy laws for the internet? Justify.

Do you think that the internet will ever run out of storage? Or will it just keep getting bigger?