Wednesday, September 28, 2011

Challenge 014

This is happening to you because you are only declaring n as a double data type. While n = 99/100, these values are not double data types. Therefore, the compiler is outputting an integer and not a double. You either need to declare both values as double by naming them or you need to make those two value double data types by adding .0 after each of them.


One solution to this problem is to put .0 after each of the values because that turns it into a double data type.

double n = 99.0/100.0;

This is telling the compiler that this is a double data type which will eventually lead to the output of a double.



Another solution that would work would be to name each of the values. I used x and y. This is useful because you can then declare each of the values separately as a double data type instead of the whole quantity, n. You then need to tell the compiler to output the quantity (x/y). Since these two values were declared double, they will output a double data type of 0.99.

double x = 99; double y = 100; System.out.println(x/y);

Tuesday, September 27, 2011

Challenge 009

First I had to research Boolean Variables. I found out that either x or y have to be true and their conjugate has to be opposite.

If x were true and y were false, then it would fit all three expressions.

For the first expression, both sets must be true because of the && symbols. this works because x is true in the first statement and y is true in the second set because ! means not so not false will make it true

For the second expression, both sets must be true again and that is the case because x is true in the first set and the second set is true because !(x && y) means (!x || !y) and !y is true.

For the third expression, either the first or the second set must be true and that is the cause because x is true and !y is also true. These both need to be true due to the &&


Friday, September 9, 2011

Challenge 008

The output ends up to be -1.

We name the value "num"

The initial value starts out to be 5. int num = 5;

The while loop tells us that the value will decrease by an interval of 2 and that the loop will continue to do so until the value turns out to be less than 0.
The next line tells us that the interval is to decrease by -2 num -= 2;

This tells us that the value most be -1 because it cannot pass -2 and the value has to be less than 0.

Challenge 010

TThe output turns out to be 2.0 .

the initial value for m is 4 and n is 5 int m = 4, n = 5;

We then add m and n so 4+5. double d = Math.sqrt((m + n) / 2);
Then we divide by 2 and take the square root.
The answer is then rounded to the nearest whole number because of double. Double is a type of data. A double Data type can hold a floating-point real number. It can only hold several decimal points. Because the int is before the m and the n, when you take 4+5 to get 9 and divide by 2, you end up with 4.5 but only take the integer which is 4. The square root of 4 is 2 and because the code is calling for a double data type, it adds a decimal value which in this case is 0. For example:

If you take the square of 4.5, it will kick out 2.0. If you take the square root of 9.123412345, it will kick out 3. If you plug in 9.999999999999, it will kick out 3.0.
However, as soon as you take a square root of an integer that is not a perfect square, it will give you the decimal value for example, sqrt of 10 is 3.162277... and when it is output from the compiler, it is also 3.162277...

= 4+5=9. 9/2= 4.5 but you only take the int. SO...: sqrt of 4= 2. and because it is double. you get 2.0!!!

THIS BETTER BE CREDITED!!!!!

Challenge 007: 9/11 Conspiracy?

Since it's coming up and is such a good debate topic, I want to post a video about the 9/11 conspiracy that so many people swear by.



The music is annoying in the background but you still get good audio of what the people are saying. So watch this short clip and then respond to the topic listed below. Also feel free to come up with your own questions or just say what's on your mind.

  1. Is the U.S. government to blame for the attack on the WTC?
  2. Do you believe that there were bombs planted in the bottom of the towers?
  3. What do you think about people calling out our government and saying it was our fault that this occurred?
So you guys don't take this the wrong way, I think this video is complete garbage!

Monday, September 5, 2011

Challege 002 Synthetic Life

Creating a synthetic Cell will without a doubt change our biologic lives as we know them. To transplant chromosomes and sequences of DNA, it not only takes great intelligence, but also creativity. From the sounds of it, it is an extremely lengthy process that has no room for the slightest error. Craig Venter and his team had one error out of over a million base pairs and that set them back three months in order to analyze and correct their mistakes. They used technology by using a debugging software to find the error and to repair the sequence. In order to have the patience and design to work on a sequence for 15 years is incredible. I also find it interesting and unique to embed watermarks within the sequence of code in order to establish that someone has demonstrated the code correctly. They implemented an e-mail address in that someone can send a message to if they have written the code correctly. I think that this is definitely helpful because it tells the person that they are on the right track. One of the quotes, "See things not as they are, but what they might be," tells me, personally, that someone should not simply demonstrate mastery on a specific topic by completing it based of off fact, but to come up with your own way to reach the end of that topic. This all leads back to the idea that creativity will get you further than one may realize. To perform a task off of facts is not as important as performing a task based off of one's personal (creative) understanding on a topic.

From an ethical standpoint, I think that it is still up for debate: Rather creating life synthetically is ethical, is up to the people to decide. I dont think that the white house should classify ideas like this, but I do think that they should determine wether it is ethical or not. But do I think that it is ethical to substantially decrease the time to create a vaccine for a deadly disease? Yes, but there are also other things to look at, so I think this topic can go either way, depending on how you look at it.

I have to imagine that if we are able to transplant DNA and chromosomes, this will open up new ideas in the future. If I had the technology, materials, and intelligence, this is would i would do with my knowledge:
When a baby duplicates chromosome 21 for a total of 47 instead of 46, it results in down syndrome. Now again, I dont know if any of this is possible or has been done already, but i would try to transplant a normal pair of chromosome 21 with the abnormal (down syndrome) set of chromosome 21. If this is possible to do, I would assume that this will result in a cure for down syndrome. If this is possible to do, it would leave me to assume that other DNA abnormalities can also be cured.