Hello, i am back with another blog post on my website and today it will be on Chapter 11 because i was doing python and programming some scenarios. Here are some key words that we learned in the lesson yesterday. Integer, Real, Char, String, Constant and Variable.
Integer – An integer is a positive or a negative whole number that can be used with mathematical operators.
Real – A Real Number is a positive or negative number with a fractional part. Real numbers can be used also with mathematical operators. Not all programming languages distinguish between real numbers and integers. (We are not doing java script but we are programming with python) JavaScript makes no distinction but Python does with built-in functions.
FirstInteger = int (25) sets up an integer variable with the value of 25 in python.
FirstReal – float (25) sets up a real variable with the value of 25.0 in python
Char – A variable or constant of type of CHAR is a single character.
var Gender = ‘F’ JavaScript
Gender = ‘F’or Gender = “F” Python
String – A variable or constant of type STRING is several characters in length. Strings vary in length and may even have no characters: an empty string. The characters can be letters and/ or digits and/ or any other printable symbol. For example(Python):
TelephoneNumber = ‘0811234567’
FirstName = ‘Daniel
UnRepeatable = ‘@!&&@@##!’
Boolean – A Boolean variable can have only two values: TRUE or FALSE.
AgeOver21 = true
Constant – A named data storage that doesn’t change when program is executed.
Variable – A named data storage that contains a value(can be potentially be change or written over)
Well, that’s all for today’s blog and there should be another blog for today’s lesson on chapter 11 again. BYEEEEEEEEEEEEEEE.
Hello there! I’m back with another post today there won’t be a lot of text but one big picture of what i had just done for homework.
Here is a program on a survey.
Hey Guys I am back with a video today on a Python Script explaining codes and validations and what I have learnt so far. Enjoy!
Sequence – Instructions which come on after the other. Computers only handle instructions one at a time, programs generally are written in sequences. Sequences can contain any number of steps but MUST be executed in thee correct order.
Selection – Selections allow the program to pick a specific criteria or anything specific and can be used by the if function. For example when you go in to word and you have to make selections of what pages there are for you to choose.
Repetition – Most program languages uses three different types of loop:
- A fixed number
- Keeps going until a condition is met
- At least one loop and condition is tested at the end of the loop
Totaling – Some programs need a running up total, the answer is always going up, normally in integers. It will go up each time you get an answer correct. For example: Buying items, how many items you get will give you the total. The total will always change depending on how many items.
Counting – A lot of people gets this confused with totaling even though they are related. Counting is just basically going up by 1 at the end of a loop. For example: Football, every time a person scores the score goes up by 1.
Test data table for number of tickets:
Hi guys! Today I’m back with another video for you, this is just a fun activity we did in class when my teacher was sick and didn’t come to school, enjoy!