In today's class of python in computer science, we learn't how to make the system count from 2 all the way to 20. Even though on the string of "while" it says <21, it means to count until your under the selected number. In this case, we wanted to count to 20 so we need to make sure that the number is perfect so the eventually the system successful counts to 20
Monday, 22 September 2014
Saturday, 20 September 2014
Challenge 1-The Five times tables!
In Class, we were assigned a challenge to attempt to make python figure out how to do the 5 times tables by itself and make it loop until it reached "12x5". After long amounts of waiting, thinking and working, I finally came up with a smart solution. To look On the internet. It was then until i found the code for n in range(1,13): print( "%d x 5 = %d" % (n, n*5). This code continues the loop from "5x1" till "5x12". The picture below Shows it in action. However while i was working i came up with the Code
number=1
While number<9:
Print(number)
This Code was the code i was using but had failed.
number=1
While number<9:
Print(number)
This Code was the code i was using but had failed.
Monday, 15 September 2014
Assigning Values!
In today's lesson of Python in computer science, We learnt how to Assign Values to letters or Words. For example, in the Picture Below, you can see that the letter "a" is set as the number '6" and then letter "b" is set to "7". This makes things easy when creating formulas like A+B or A*B. The whole string is used to show existing values given to Words or Letters. These Letters or words or words are known as variables. I feel as learning these types of commands and tricks in python will help a lot when i am to go To university as well as when i chose my future job which i really want to be apart of a famous Company like Valve or Ubisoft.
Saturday, 13 September 2014
Maths in Python!
Maths in Python is very easy to accomplish, All that has to be done is writing 1 of 4 Mathematic
signs. The signs are Addition: + Subtraction: - Multiplication: * Division: / Doing maths in Python is very fast to do and very useful as it includes some things you can't do on a scientific calculator or any Calculator.
signs. The signs are Addition: + Subtraction: - Multiplication: * Division: / Doing maths in Python is very fast to do and very useful as it includes some things you can't do on a scientific calculator or any Calculator.
Wednesday, 10 September 2014
2 days of Work in Python!
Yesterday, In computer Science we started working in The Python software. We started with basic coding and simple strings. For example, we started by writing the script print ("Hello World"). When using the script , the next line of text would say "Hello World" as we learned that "print" is one of many different commands Python has for offer.
We also Learn't how to use the command \t and \n. These two commands put the answer on to a new: tab for \t or a new line for \n. Preforming the command \* puts an * at the beginning of an answer. Finally when wanting to quote someone or something, you must use the \" the beginning of the word and another at the end of the word which will wrap the word around in speech marks. if you weren't going to do this, the whole string of text would come up as an error and it would not work. I enjoyed today's and yesterdays work quite a
lot as i got to learn a lot of new interesting features of python. Hopefully in the Future we will get to learn more interesting Things about Python and Coding in general.
We also Learn't how to use the command \t and \n. These two commands put the answer on to a new: tab for \t or a new line for \n. Preforming the command \* puts an * at the beginning of an answer. Finally when wanting to quote someone or something, you must use the \" the beginning of the word and another at the end of the word which will wrap the word around in speech marks. if you weren't going to do this, the whole string of text would come up as an error and it would not work. I enjoyed today's and yesterdays work quite a
lot as i got to learn a lot of new interesting features of python. Hopefully in the Future we will get to learn more interesting Things about Python and Coding in general.
This is when we lean't how to use \t and \n as well as how to quote things and people. ![]() |
This is When we learn't how to use "print" |
Sunday, 7 September 2014
Python work In Class!
In Class today, we worked with a program for coding known as Python. Python today can be used to create lots of things that connect with Technology. For Example, Python can be used to create Questionnaires, Games, Websites, Applications and more. Today, we Went over some of the basics of python which included setting variables and how to do basic Mathematics. I also had learn something called a WhiteSpace which is used to structure how the code is set out. The last Part of the first course was to bring what was learnt Altogether. So far i am Enjoying myself with Python and Can't wait for the upcoming future where i am certain we will learn a lot more Interesting features and Tricks with It.
![]() |
The Final Stage of Course 1 which i Achieved was to Bring all that was learnt together. |
Subscribe to:
Posts (Atom)