Wednesday, December 4, 2013

Weeks of November 20 to December 4

Due to an unlucky combination of events (and Thanksgiving break), I didn't have my internship for three weeks in a row. However, I still did some work on my own at home.

My main task was to finish writing my Python program that calculates if a number is prime or not and returns all primes under 100. Here's the completed program:
I started off by defining a function is_prime. I told Python that for the is_prime function, if a number is divided by the value "x" in the defined range and the answer is 0, then the statement is false. If the answer is not 0, then the statement is true.

In the next section, the raw_input function prompts the user to enter a number, which is set equal to the variable "number". The int() function is around this section since Python can only perform certain calculations if it's explicitly told that a number is an integer. Since I defined the is_prime function in the previous section, I can now use an if-else statement to tell the user whether the number they entered is prime or not.
This is what the user sees. Once they enter an integer (I entered 104), Python tells them whether the number is prime or not.

The next section prints out all the prime numbers under 100. Again, I defined the range and used the is_prime function to only return the prime numbers. This is what the user sees now:
All the prime numbers under a 100
I'm happy that this Python program was a success!

Another one of my tasks was to write down all the charge permutations for the decay of the hybrid meson (psi/g).


The psi/g is neutral. If the psi/g exists, it is predicted to decay to two particles called a D2 and a D. Now, the D2 decays to a D* and a pi. When the D* decays (ether from the psi/g or the D2), it decays to a D and a pi. Based on the law of conservation of energy, I came up with the following charge permutations that result in D mesons:



1) psi/g --> D2+  D-
                D2+ --> D*0  pi+
                            D*0  -->  D0  pi0

2) psi/g --> D2+  D-
D20 → D*+  pi-
D*+ → D0  pi+

3) psi/g --> D2+  D-
D20 → D*+  pi-
D*+ → D+  pi0

4) psi/g → D2+  D*-
D2+ → D*0  pi+
D*0 → D0  pi0

5) psi/g → D20  D*0
D20 → D*  pi-
D*+ → D0  pi+

6) psi/g → D20  D*0
D20 → D*  pi-
D*+ → D+  pi0





2 comments:

  1. Thanks for working on a missed week. There should be many remote opportunities like this in the future.

    I appreciate the sequential and descriptive aspect of this post. You break things down into digestible chunks, complete with great illustrations. Keep up this kind of writing!

    ReplyDelete
  2. Tennesseeans unite!! I get to be your blog manager, Maryam. Woo hoo!!! O.k. so where are we here? You haven't posted in quite some time. Your earlier posts are awesome, great work there. I love the design of your blog--from the background to the title. Two things: just need to make sure you're adhering to the biweekly posting schedule and am excited to begin discussing how you might take this experience and convert it into a Signature Project this spring. Do you already have ideas or can I help you brainstorm?

    ReplyDelete