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, June 17, 2012
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
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...
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
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 =.=
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.
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~
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~
Wednesday, June 13, 2012
Wednesday, 13th June 2012
Slept at 12.30 last night, today woke up quite tired x.x
Was deep in thoughts this morning, thinking how to stop my cat escaping the house through my window.
Father thought I having troubles, asked me why am I so quiet lol
Sian, today Creative Concept need to act out
It's for overcoming stage fright
But I don't have stage fright, I have act fright x.x
Muffin came my house after school, to make notes and also study for tomorrow's UT
After we made notes for Communication Practice, I sent her back to Clementi
We went to eat Pepper Lunch and also Ice Kacang.
She ordered beef pepper lunch while I ordered the salmon one ~.~
The Ice Kacang sucks seriously lol, wonder the red bean low quality or what
Hope tomorrow can finish UT on time x.x
Was deep in thoughts this morning, thinking how to stop my cat escaping the house through my window.
Father thought I having troubles, asked me why am I so quiet lol
Sian, today Creative Concept need to act out
It's for overcoming stage fright
But I don't have stage fright, I have act fright x.x
Muffin came my house after school, to make notes and also study for tomorrow's UT
After we made notes for Communication Practice, I sent her back to Clementi
We went to eat Pepper Lunch and also Ice Kacang.
She ordered beef pepper lunch while I ordered the salmon one ~.~
The Ice Kacang sucks seriously lol, wonder the red bean low quality or what
Hope tomorrow can finish UT on time x.x
Tuesday, June 12, 2012
Tuesday, 12th June 2012
Reached school early & suffered in science terribly cause is chemistry topic -_-
Not gonna elaborate much about it.
Managed to do my Creative Concept UT without much difficulties, I liked the Durian & Batman part lol.
UT ended around 5.30, still got another one on Thursday x.x
Went to eat Mac Donalds with Muffin at Admiralty, also purchased a new shampoo & toothpaste.
The new shampoo states with conditioner, seems to work o.o
Can feel my hair smoother now, hope the effects last lol
Asked programming 06 problem statement from Sotong, mindfu3ked by it
Not gonna elaborate much about it.
Managed to do my Creative Concept UT without much difficulties, I liked the Durian & Batman part lol.
UT ended around 5.30, still got another one on Thursday x.x
Went to eat Mac Donalds with Muffin at Admiralty, also purchased a new shampoo & toothpaste.
The new shampoo states with conditioner, seems to work o.o
Can feel my hair smoother now, hope the effects last lol
Asked programming 06 problem statement from Sotong, mindfu3ked by it
Gonna die on Thursday le x.x
Monday, June 11, 2012
Monday, 11th June 2012
Woke at 5 am, unable to sleep x.x
School finally starting soon, feeling slightly uneasy (not sure why)
Reached school on 8 am, kinda early
Wonder today do what, hope I won't fall asleep ~.~
Today need do about perspective of story, my group decided on Snow White.
Need to re-write Snow White story from the view of step mother/witch.
Managed to survive today, got along with my team mates cause of random chit chat.
Talk with guys about anime stuffs, while talk with girls about bullies in school.
Today briefly taught Muffin abit of programming, also went to eat Okonomiyaki with her.
Reached home at 9, also tio bus sick from 858 -_-
School finally starting soon, feeling slightly uneasy (not sure why)
Reached school on 8 am, kinda early
Wonder today do what, hope I won't fall asleep ~.~
Today need do about perspective of story, my group decided on Snow White.
Need to re-write Snow White story from the view of step mother/witch.
Managed to survive today, got along with my team mates cause of random chit chat.
Talk with guys about anime stuffs, while talk with girls about bullies in school.
Today briefly taught Muffin abit of programming, also went to eat Okonomiyaki with her.
Reached home at 9, also tio bus sick from 858 -_-
Sunday, June 10, 2012
Sunday, 10th June 2012
Slept at 8 am, woke at 3 pm.
Nothing to do & tomorrow starts school le x.x
I don't mind going school, I just hate how Art of Story already gave me 3 C for 5 lessons =.=
Wanted to go find Muffin this evening, uncle suddenly came to visit.
So my father bring us go eat at a seafood restaurant
- Lobster porridge
- Fried egg with prawns
- Fried chicken
- Random vegetables
Then uncle asked me pei him walk Chong Pang to see durians, mini ones (50 cents each)
In the end buy until 16, my father took home 8.
Durians x.x
Nothing to do & tomorrow starts school le x.x
I don't mind going school, I just hate how Art of Story already gave me 3 C for 5 lessons =.=
Wanted to go find Muffin this evening, uncle suddenly came to visit.
So my father bring us go eat at a seafood restaurant
- Lobster porridge
- Fried egg with prawns
- Fried chicken
- Random vegetables
Then uncle asked me pei him walk Chong Pang to see durians, mini ones (50 cents each)
In the end buy until 16, my father took home 8.
Durians x.x
Subscribe to:
Posts (Atom)
