Tuesday, June 19, 2012

Practice of coding during UT clinic [ Electronegativity values difference between elements ]

The UT clinic was unhelpful to a large extent, so I practice programming on my own without any references.

a = raw_input("Please enter the 1st Electronegativity")
b = raw_input("Please enter the 2nd Electronegativity")

try:
    a = float(a)
    if a < 0:
        print "Invalid value"
        exit()

    b = float(b)
    if b < 0:
        print "Invalid value"
        exit()

except:
    print "Please enter valid float"
    exit()

if a > b:
    c = a - b
elif b > a:
    c = b - a

if c < 0.5:
    print "Difference is " + `round(c,2)`
    print "It is Non-Polar Covalent Bond"
    print "Temporary Charges"

if c > 0.5 and c < 2.0:
    print "Difference is " + `round(c,2)`
    print "It is Polar Covalent Bond"
    print "Permanent Charges"

if c > 2.0:
    print "Difference is " + `round(c,2)`
    print "It is Ionic Bond"
    print "Permanent Charges"

Electronegativity and Types of bonds

When two atoms share electrons, a covalent bond is formed.
i.    If electrons are shared more or less equally, a non-polar covalent bond exists between the atoms (e.g. H-C).

ii.    If electrons are shared unequally, a polar covalent bond exists between the atoms (e.g. H-O).













Values of the elements


Tuesday, 19th June 2012

Slept at 10 pm last night
Today woke at 7 am to buy Egg McMuffin for Muffin

Today need study the chemical properties of water
Example:
- Why does ice cube float on water
- Why is water able to dissolve various substances like salt
- Why water has a high boiling point

Notes :
Hydrogen Bonding can only occur when H is interacting with F, N or O

To determine the polar, non-polar or ionic bond.
Need calculate the difference between the elements de elctronegativity values.

Monday, June 18, 2012

Monday, 18th June 2012

Finally art of story

Lesson starts on 8.30, teacher arrive at 9

3rd meeting start at 1.30, teacher reach at 1.45 lol

Sian....

Teacher leaving soon, by end of this month
Make me wondered, who would be my new teacher?
I hope no more Cs =.=

Slept for 2 hours only last night, from 5+ to 7+ am
So tired lol, almost fell asleep on bus

After school, went Causeway Point to eat Pizza Hut
Today Darren's birthday, eat pizza to celebrate
But the offer really shitty, plus got GST & Service Charge
I think I next time eat pizza at my area better lol

Sunday, June 17, 2012

Rounding Decimal Points (Money)

Just a random code I made when got nothing to do, figured might have to count money stuffs sooner or later.

a = raw_input("First price")
b = raw_input("Second price")
c = raw_input("Third price")

try:
    a = float(a)
    if a < 0:
        print "Please enter positive values"
        exit()

    b = float(b)
    if b < 0:
        print "Please enter positive values"
        exit()

    c = float(c)
    if c < 0:
        print "Please enter positive values"
        exit()

except:
    print "Invalid"
    exit()

def ExtraCost(a,b,c):
    cost = a + b + c
    gst = cost * 0.07
    svc = cost * 0.1
    print "Intial cost is $" + `round(cost, 2)`
    print "GST is $" + `round(gst, 2)`
    print "Service charge is $" + `round(svc, 2)`
    total = cost + gst + svc
    return round(total, 2)

print "Final cost is $" + `ExtraCost(a,b,c)`

Sunday, 17th June 2012

Woke up around 4 today x.x
Last night slept too late, nothing to do today anyway
Slacking~

Think will get this on Tuesday for Muffin




Don't feel like going to school tomorrow cause I got 3 Cs from 5 lessons only =.=
Wonder what do I have to write to get B or better...

Saturday, June 16, 2012

Saturday, 16th June 2012

Woke up late today despite is 1st month with her x.x

Ate a $10 cake with her

Walked around Jcube until 9+

Went to check out all the stores in Jcube, saw some weird ones
Also saw people ice skate, kinda cool
But I still remember how I sucked in ice skating, so I won't go down to skate



Roughly like that, nothing much o.o

Friday, June 15, 2012

Friday, 15th June 2012

Today reached school quite early, around 8
Waiting for class to start x.x

Didn't change group today cause teacher forgot

Today Communication Practice need do something about Air Force 1
I lazy elaborate lol

1 word to describe, troublesome

Managed to bullshit about my reflection journal for Communication Practice
Still got Air Force de need to bullshit, why need 300 words also sia
They really will read it de meh =.=

Thursday, June 14, 2012

Reflection Journal for Programming 06

The Question (from http://bit.ly/KxmVcS) :





























The Code :

# 4 line version

for i in range(0,10,1):
    print (i*'#') + (22 - i*2) * ' ' + (i*'#')
for i in range(10,0,-1):
    print (i*'#') + (22 - i*2) * ' ' + (i*'#')


OR

# 5 line version

def hourglass(a,b,c):
    for i in range (a,b,c):
        print (i*'#') + (22 - i*2) * ' ' + (i*'#')

hourglass(0,10,1)
hourglass(10,0,-1)


Reflection : Managed to figure out how the pattern of the code should be after 10 minutes of screwing around with the codes.
I'm bad with visualizing such stuffs in my mind with program codes, hope next time don't have such troublesome question lol.


Thursday, 14th June 2012

Today programming lesson
Tio scam
Not ball, but is a moving stick
Teacher tell me is a running man, what shitty graphics is that lol


Gao~

Managed to finish today de programming target cause got help from other programmers
Hate visualizing weird things =.=


Reflection Journal also need write about codes LOL

After programming lesson, went for 2nd UT
Which is Communication Practice

Kinda easy actually, at least easier than Creative Concepts lol
At least no need think about durian and batman~