Pre IB CS

Reflection of Dec.19th: Intro to spreadsheet and functions

I love this topic of spreadsheet! First, it is quite useful. I’ve been wishing that I could use different functions of the spread sheet for “decades”, yet I didn’t receive a systematic education of that. This is a precious opportunity for me to learn these. Also, as we are editing the functions, we should pay attention to the details as well, which cultivated our sense of preciseness. What’s more, Mr. Pete adopted an advanced teaching way – we learnt Spreadsheet all together through the internet. We can attach to our teacher’s sample, as well as learning from others.

What is Spreadsheet?

Spreadsheet belongs to software. Spreadsheet is a grid of cells organized into rows and columns in which we enter and store our data. Using spreadsheet software, we can do all of the following: Create, edit, sort, analyze, summarize, and format data as well as graph it. Keep budgets and handle payroll Track investments, loans, sales, inventory, etc.

1

↑spreadsheet on zoho

2

classmates chating crazily through this platform

3 cell address

↑The cell address of the selected cell is shown in the left-top of the page.

We can use the spreadsheet to deal with a numerous of real issues.

For example:

Create a story together.

By using the concatenate function, we can put texts in different sheets that represents different students in our class to combine the paragraph. The formula is:

=CONCATENATE(textA;textB;…;textX)

We used the concatenate function to make up the paragraph in the team. Then Mr. Pete used it again to combine the paragraphs again. It is quite easy for us to know the location of each words and we can change the word immediately with extract work, whereas if one of the person changed the refering cell, we cannot get the entire passage anymore.

Examine my scores.

To do this, we should first put our scores in the column. (All the numbers in my sheet is fake ) I used random number to create most of them within 1-100. Here I have a question: how can we create the decimal numbers with RANDOM function. I haven’t figured it out yet. We can do the AVERAGE/SUM function. Then it will give us the calculation results almost immediately.

10AVERAGE

↑the process of calculating AVE and SUM

From the data, we can know our average and sum score to see whether we are balanced.

Examine further about the score.

We can use the following functions to reach different aims.

MAX
Returns the maximum of a list of arguments, ignoring text entries.
We can use this function to find the best subject for us in the section.
MAX(number1; number2; … number30)
number1 to number30 are up to 30 numbers or ranges containing numbers.

 

MIN
Returns the minimum of a list of arguments, ignoring text entries.
This helps us to find which subject is waiting us to improve.
MIN(number1; number2; … number30)
number1 to number30 are up to 30 numbers or ranges containing numbers.

 

ROUND
Rounds a number to a certain precision.
This helps us to round the numbers to a ertain precision, omitting some useless decimal points.
ROUND(number; places)
Returns number rounded to places decimal places. If places is omitted or zero, the function rounds to the nearest integer. If places is negative, the function rounds to the nearest 10, 100, 1000, etc.
This function rounds to the nearest number.

 

ROUNDDOWN
Rounds a number down, toward zero, to a certain precision.
This helps us to round the number as the smaller one.
ROUNDDOWN(number; places)
Returns number rounded down (towards zero) to places decimal places. If places is omitted or zero, the function rounds down to an integer. If places is negative, the function rounds down to the next 10, 100, 1000, etc.
This function rounds towards zero.

99.12345 à =ROUND(C3;2)

 

ROUNDUP
Rounds a number up, away from zero, to a certain precision.
This helps to round the numbers into a bigger one.
ROUNDUP(number; places)
Returns number rounded up (away from zero) to places decimal places. If places is omitted or zero, the function rounds up to an integer. If places is negative, the function rounds up to the next 10, 100, 1000, etc.
This function rounds away from zero.

 

ABS
Returns the absolute value of a number.
We can use it when we want to see the change but not the effect.
ABS(number)
number is the number whose absolute value is to be calculated. The absolute value of a number is its value without the +/- sign.

 

Challenge 2

 

COUNT
Counts the numbers in the list of arguments, ignoring text entries.
If migth help us when we want to know how many scores do we have.
COUNT(value1; value2; … value30)
value1 to value30 are up to 30 values or ranges representing the values to be counted.

(

COUNTA
Counts the non-empty values in the list of arguments.
If migth help us when we want to know how many scores do we have, including the absent ones.
COUNTA(value1; value2; … value30)
value1 to value30 are up to 30 values or ranges representing the values to be counted.

)

COUNTBLANK
Returns the number of empty cells.
If migth help us when we want to know how many scores do we not have.
COUNTBLANK(range)
Returns the number of empty cells in the cell range range.
A cell that contains blank text such as spaces, or even text with zero length such as returned by =””, is not considered empty, even though it may appear empty.

 

COUNTIF
Counts the number of cells in a range that meet a specified condition.
We can use this to test whether we passed this subject.15
COUNTIF(test_range; condition)
=IF(C3>60;“Pass”;“Fail”) <– the example
test_range is the range to be tested.
condition may be:
A number, such as 34.5
An expression, such as 2/3 or SQRT(B5)
A text string
COUNTIF counts those cells in test_range that are equal to condition, unless condition is a text string that starts with a comparator:
>, <, >=, <=, =, <>
In this case COUNTIF compares those cells in test_range with the remainder of the text string (interpreted as a number if possible or text otherwise).

 

RANK
Returns the rank of a number in a list of numbers.
It helps me to rank my scores. We can also use it the determine the biggest planet in solar system etc.
RANK(number; numberlist; order)
Returns the rank of number within the unordered range or array of numbers numberlist.
If order is zero or omitted, numbers are ranked with the highest being first; if order is non-zero, numbers are ranked with the lowest being first.
An error results if number is not present in numberlist.

 

Determine the range and give out comments.

16记事本

We used the word editor to create a pseudocode to relate our scores to IB scales. Here is the result:

=IF(AND(C3>=0;C3<=49;“1”;IF(AND(C3>=50;C3<=59);“2”;IF(AND(C3>=60;C3<=69);“3”;IF(AND(C3>=70;C3<=79);“4”;IF(AND(C3>=80;C3<=89);“5”;IF(AND(C3>=90;C3<=96);“6”;IF(AND(C3>=97;C3<=100);“7”;“N/A”))))))))

One of the most important thing is that, we should pay attention to the amount of brackets. Also, we should not use extra space or the comma in Chinese typing form. Every single detail should be paid enough attention.

After that, we an know how much we get in IB programme.

19

We can also use the markers to lable different kinds of numbers/ words.

Conclusion

All in all, the spreadsheet is very useful and powerful. I will definitely use it in the next project!

Pre IB CS

Reflection of Nov.28th: Software

Computer software, a collection of data or computer instructions that tells the computer how to work. (definition of algorithm too!) This is the opposite word to the hardware because people cannot touch them technically. There are mainly two parts of computer software, system softerware and application software. This reflection will briefly talk about what we have learnt about the software.

Usage of software

Software is a set of instructions that tell the hardware what to do.The software helps with the operation and applying of the computer. When clients or users want to use the computer, they will deal with application softwares and the application will deal with operating system which further let hardwares get instructions of what to do.

A diagram showing how the user interacts with application software on a typical desktop computer

 System software

( system software ≠ software system! A software system is a system on intercommunicating components based on software forming part of a computer system.—— Wikipedia)

System software is a kind of media between application software and hardwares. It helps to operate the hartware as well as gives a platform for the running of application software.

See the source image

examples of system softwares

The system software includes four sublevels including :

  • operating system software

An operating system software is a collection of programs that makes the computer hardware convenienly available to the user. This part is very essential since human users can either attach to application software or operating system. And if they contact to application software, it will tell the operating system as well.  Eventually the operating system tells either directly the hardwares or let other system softwares to tell the hardwares. Unevitably, the process of operating system is highly required. Without the operating system, the application programs would be unable to communicate with the computer.

See the source image

the process an instruction is executed by the computer

  • utility programs

Utility software is system software designed to help analyze, configure, optimize or maintain a computer. They provide very specific task related to working with computers. They are used for maintaining the computer could run smoothly. Make sure the system is working healthily. There are examples for this utility programs: virus scanners, disk defragment, system monitor, file managers. They do protecing, speeding up, looking at current system resources and adding or delating files jobs.

Image result for utility software

contrast of application software and utility programs

One of the example of utility programs is the winrar. I did the research after Mr. Pete left us the homework to research for this.

I have used winrar. This helps me to conpact my files together to make it take less place… it is useful because sometimes we cannot send out or upload a too big file online then we need it to be compressed. It is newer and more effective than winzip,however it cause a bit more time.

——from my last homework

See the source imageSee the source image

  • library programs

A library programs is a collection of complied routines that other programs can use. Ready made pacakages that you can make use of are in the libraries. They are used for the development of softwares. It contains the code and data. For example, all the microsoft office products have same look and feel because they are using the same graphical user interface libraries.

查看源图像

interfaces of Microsoft Office

We also watched a short video about how the video games are made. The processes are quite complicated. I believe some of the libraries are used inside to make it more convenient and ensure the technology keeps moving forward.

  • translator software

Translator softwares allows new programs to be written and run on computers. They convert source code into machine code. There are three types:

  1. Assembler
  2. Compiler
  3. Interpreter

Assemble is a program that translates an assembly language program into machine code. We then watched a short video talking about the difference between compiler and interpreter.

Aspects\Types Interpreter Compiler
Characteristics Analyze one line each time

Always between you&computer

Take a program and translate high-level language all at once
Advantage We can change mistakes as we watch each influences of our instructions Slow at the taking stage, much faster in the end
Disadvantage Slower We cannot change mistakes as the result comes all at once

Application software

There are not for the operation of computers but for users. It is a software designed to help the user to perform specific tasks, such as writing a letter or processing orders.

Generally speaking, there are three categories of Application softwares:

  • General purpose application software

General-purpose software is a type of software that can be used for many different tasks. For example word processor.

查看源图像

Example of word processor

  • Special purpose application software

Special-purpose software is a type of software that can be used for excuting a single task. For example web browsers which can only display the web pages, calculators and media players.

查看源图像

Example of calculator

  • Bespoke application software

Unlike other application softwares that are made for general uses, Bespoke application softwares are tailor made for specif users. Especially for certain businesses or military uses.

查看源图像

a book talking about softwares that MADE JUST FOR YOU

Presentation

We had a presentation about word processors and web browsers. They are perspectively general and special purpose applications. We clarify some concepts as well as the working theories unders those applications. We also shows some examples and distinguish these two appications with other 6 types of applications, using decomposing computational thinking.

Conclusion

All in all, this chapter is quite familiar to our life. What we learnt helped us to clarify some uncertain areas of computer science. We should also keep using the computational thinking all the time and practice the skill of using them in order to success.

Reference

https://en.wikipedia.org/wiki/Software

https://cn.bing.com/images/search?view=detailV2&ccid=8cvD%2frZI&id=0DE41C9CC8E9440614969234B7ABA5B0970E4902&thid=OIP.8cvD_rZIMzJ7TAAw8Hz3zwAAAA&mediaurl=https%3a%2f%2fqph.ec.quoracdn.net%2fmain-qimg-45ed03ae2481bab27ebc624c71e1c1f9-c&exph=355&expw=343&q=operating+system+software&simid=608055230208737940&selectedIndex=77&ajaxhist=0

Hands on with Microsoft Office 2016 for Windows desktop preview | ExtremeTech

Pre-IB computer Science

Reflection of Nov.4th: Flowchart

Flowchart

Flowchart, as one of the expressions of algorithm(absolutely not the algorithm, but the expressions of it instead!), is introduced in the recent three classes.

As mentioned, a flowchart is a type of diagram that represents an algorithm, workflow or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows. This diagrammatic representation illustrates a solution model to a given problem. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields.            ( https://en.wikipedia.org/wiki/Flowchart)

(example of the flowchart)

We can discovered that there are several different shapes used in the flowchart instance shown above. This picture has actually been used in the previous reflection, simply as the illustration. However, there are some symbols that should have been focused. So, what are they?

Flowchart Symbols

Generally, flowcharts flow from top to bottom and left to right.

(Terminal)

Indicates the beginning and ending of a program or sub-process. Represented as a stadium, oval or rounded (fillet) rectangle. They usually contain the word “Start” or “End”, or another phrase signaling the start or end of a process, such as “submit inquiry” or “receive product”.

(process)

Represents a set of operations that changes value, form, or location of data. Represented as a rectangle.

(decision/selection)

Shows a conditional operation that determines which one of the two paths the program will take. The operation is commonly a yes/no question or true/false test. Represented as a diamond (rhombus). (There must be ONE INPUT and TWO OUTPUT as a correct decision symbol!)

 

(input/output)

Indicates the process of inputting and outputting data, as in entering data or displaying results. Represented as a parallelogram (I never know how to spell that until just now. This might be the value of writing this reflection! It’s really useful!).

 

(arrowhead)

Shows the process’ order of operation. A line coming from one symbol and pointing at another. Arrowheads are added if the flow is not the standard top-to-bottom, left-to right.

For the symbols mentioned above, except for the dimond shape and the terminal shape, all the shapes have to have two arrowheads: one input and one output. For the start and end – the terminal shape – they need to have one arrowhead from different directions respectively, to make them be the real “start” and “end”. For the dimond shape, three related arrowheads are required to be touched with, one input and two outputs.

IF, IF-ELSE, IF-ELSE-IF, Nested IF, and Looping (While and Do-While)

IF statement

If statement is used for branching when a single condition is to be checked.

( to print the square of a number if it is less than 10.)

This is an example of using if statement. A number is asked from user and stored in variable n. If the value of is less than 10, then its square is printed on the screen. If the condition is false the program, execution is terminated.

IF-ELSE

The if statement may have an optional else block. The syntax of if..else

How if…else statement works?

If test expression is evaluated to true,

  • statement(s) inside the body of if statement is executed
  • statement(s) inside the body of else statement is skipped from execution.

If test expression is evaluated to false,

  • statement(s) inside the body of else statement is executed
  • statement(s) inside the body of if statement is skipped.

(Example of the IF-ELSE statement)

IF-ELSE-IF

The if...else statement executes two different codes depending upon whether the test expression is true or false. Sometimes, a choice has to be made from more than 2 possibilities.

The if…else ladder allows you to check for multiple test expressions and execute different statement(s).

(IF-ELSE-IF example)

Nested IF

It is possible to include if...else statement(s) inside the body of another if...elsestatement.

If the dimond shape is after the “true” alternative of the last dimond shape, then the statement if “Nested IF”.

(Example of the Nested IF statement)

Loop

Generation of for loops in flowchart code. If an action or decision node has an exit transition with a guard as well as a second exit transition, and there is also a transition that brings the flow back to the original decision point, we can have  a for loop rather than a while loop by carrying out the following steps. The repeat loop will always execute the process part at least once.

(loop flowchart)

Flowchart activities/homework

We decided to do a group project to solve the real life problem about “whether you are rational or emotional”. This is a psychological test with several algorithm. Through the process, we can test a person’s certain characteristic.

 

All in all, flowchart is very vivid and clear. It have close relationship with the psedecode, so it is very logical as well. This is a good tool when we want to solve a problem, whether in real life or computer science.


References

SEVOCAB: Software Systems Engineering Vocabulary. Term: Flow chart. Retrieved 31 July 2008.

Frank Bunker Gilbreth, Lillian Moller Gilbreth (1921) Process Charts. American Society of Mechanical Engineers.

Jump up^ Graham, Jr., Ben S. (10 June 1996). “People come first”Keynote Address at Workflow Canada.

Jump up^ American Society of Mechanical Engineers (1947) ASME standard; operation and flow process charts. New York, 1947. (online version)

Jump up^ Hartree, Douglas (1949). Calculating Instruments and Machines. The University of Illinois Press. p. 112.

Jump up^ Bashe, Charles (1986). IBM’s Early Computers. The MIT Press. p. 327.

Jump up^ Goldstine, Herman (1972). The Computer from Pascal to Von Neumann. Princeton University Press. pp. 266–267. ISBN 0-691-08104-2.

Jump up^ Taub, Abraham (1963). John von Neumann Collected Works5. Macmillan. pp. 80–151.

Jump up^ Bohl, Rynn: “Tools for Structured and Object-Oriented Design”, Prentice Hall, 2007.

Jump up to:a b Alan B. Sterneckert (2003) Critical Incident Managementp. 126

Jump up^ Andrew Veronis (1978) Microprocessors: Design and Applicationsp. 111

Jump up^ Marilyn Bohl (1978) A Guide for Programmers. p. 65.

Jump up^ Mark A. Fryman (2001) Quality and Process Improvementp. 169.

Jump up to:a b c d e f g h i j k l m

Pre IB CS

Reflection of Oct.24th: Algorithm Expressions and Designing

This week, we learnt the expressions of algorithm and the designing of one particular expression — pseudocode, just as what I expected in last reflection. From this process, I felt the magic of computer science again. And what’s more, its logical thinking as well.

1. Expressions of Algorithm

Since algorithm is an impact system, it has its own expression. There are four types of expression for algorithm.

  1. Natural language: It is writing in natural language using by people, especially English. It should be clear and ambiguous. There are three steps to process with the natural language: fetch an instruction, decode the instrucion, and excute the instrucion. The example of this is “display the color red for 3 seconds”.
  2. Flowchart: A flowchart is a type of diagram that represents an algorithm, workflow or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows.A simple flowchart representing a process for dealing with a non-functioning lamp.
  3. Pseudocode: It uses the structural conventions of a normal programming language , but is intended for human reading rather than machine reading. Pseudocode typically omits details that are essential for machine understanding of the algorithm, such as variable declarations , system-specific code and some subroutines . The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm.
  4. Programming language: A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.

example of programming language  

The video “The Secret Rules of Modern Living: Algorithms”

We watched a video called “The Secret Rules of Modern Living Algorithms”. The main purpose of this video is telling us some of the algorithms that are used by human in daily life. And the ingenious uses of it as well. Here are some examples mentioned inside the video.

1.PageRank Algorithm

To help websites like Google put the entry or other information that the user are likely to click in on the top. There are two things that the importance of a page when it is ranked. One, the number of links to this page, and two, the rank of the links that link to the page. The works inside the football team shows how these instructions works. The pass from people to people is the link. The person who reveives the most balls, is the most important player. Then the player will reveive even more balls. And thus for the website, when the website has many links, it is considered as a high ranked website. If it has many links that are very important as well, it is considered even more crucial than the first one. Ane this algorithm ensure that the users can search for the information as much as they can, in a more efficient way.

Links between football players

Bobble sort

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.

The sir shows how bubble sort works by ranking the bars. Those bars are once put on the desk randomly with different heigh without any regularity. Then the man compares the height between two bars from the left hand. If the left bar is higher than the right one, the man exchanges the position of these two bars. If not, remain the two bars and go to examine the third bar with the second one. For each time, we should focus on the two bars only. After exchanging the positions, we should move to the next bar directly, without double check or nothing. After one whole round, we should start from the very beginning, until all the bars are places in order from low to high.

Bobble sort

Matching Algorithm

This algorithm has been performing in the mathing people together. The model we used is the poker. We define the different affinity for each pattern of the poker cards. The queen likes the particular king. Each character has different ranks of affinity to the other.What the algorithm going to find, is to match all the characters in the most stable way, instead satisfying someone’s wills by sacrificing others’.

How to solve this stable marriage problem? We should consider about the best, inside of the first. If two queens like the same king, we could put them beside the king. Then we should compare the king’s affinity to the two queens. The queen with higher affinity to the king should be remained.

This algorithm is better than human because it is faster and more correct. It is not only used in marriage matching, but also can be used to match students with the universities, or even for saving life. The Kidney Exchange Matching used in the UK is a good example. It helps find the poteintial spots that could serve the kidney and the spots that are searching for certain types of it. Therefore, by the matching algorithm, we can find the best solution for the patient in the shortest time period. It thus won the Noble Prize.

A depiction of the kidney as seen in a live donor transplant.

Designing the algorithm

As the content mentioned above, one expression of algorithm is pseudocode, the structural conventions of a normal programming language , but is intended for human reading rather than machine reading.

Before the designing, there are some points to think about. First, what do we want to accomplish in the end, which means our output. Second, what are the individual steps, meaning the order instructions. Third, what do we need as the input. What’s more, the desicions, such as the choice in different conditions. For example, IF I get the low score, I will cry; but IF I get the high score, I will jump. And finally, we should repeat, or say “loop”.

We then watched a video about counting people inside a room.

NUM=0,

If scan one people then

NUM=1 + NUM

output the NUM

end loop

If we add 2 for each pair of people will speed up the process. However, the problem is that it makes false when the number of people is odd. We call it buggy. So we can make the decision this time. For example we can say” if”, then add 2. And we should type in “else if” for the next condition. Until we finish all the conditions, we should type in “end if” as the end.

example of psedocode expression

From this week, I got a deeper insight of the algorithm and its function and utilize in the reality. In my opinion, it is quite vital and useful because by its main purpose is to save time and fix the problem. That’s why it could be extremely helpful when people are solving the problem with time limit. From the instance of the Kidney system, we know that it could even save people’s life. We can illustrates a solution model to a given problem by using the algorithm.

 

References:

Zobel, Justin (2013). “Algorithms”. Writing for Computer Science (Second ed.). Springer. ISBN 1-85233-802-4.

Thomas H. CormenCharles E. LeisersonRonald L. Rivest, and Clifford SteinIntroduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Problem 2-2, pg.40.

Sorting in the Presence of Branch Prediction and Caches

Fundamentals of Data Structures by Ellis Horowitz, Sartaj Sahni and Susan Anderson-Freed ISBN 81-7371-605-6

 

Pre IB CS

Reflection of Oct.8th: Algorithm and computational thinking

Algorithm, a totally new term from my perspective, is the main word we dealed with last week. We studied this term by doing some activities and self dicovering, anyway, a variety of ways. It is defined as step by step clear instrucions to solve a problem in a reasonable time in the most effective way. For today’s reflection, I’m going to explains some details of algorithm and methods we got familiar with it.

See the source image

Computational thinking

First, algorithm is one aspect of computational thinking, the core of computer science. The four aspects of computational thinks are:

See the source image

1)Decomposition:break the information down into categories to make things clearer.

2)Abstraction: Focusing on one thing. For example, when we are analysing the trick of a poker cards, we could pay attention to the colors instead of the numbers and patterns of it if it is not needed.

3)Pattern recognition: Analyzing and looking for the repeating sequence.

4)Algorithm: A self-contained step-by-step set of operations to be performed. (or the definition showing above)

Properties of Algorithms

See the source image

Algorithm is quite important to the maths and computer science. Here are some properties that an algorithm should contain:

1Input: Each algorithm needs to have at least one input.

2Output: Each algorithm needs to have at least one output.

3Finiteness: The process should be terminated after a finite number of steps.

4Defineness: Each instruction should be precise and clear.

5Effectiveness: Every instruction should be written in basic and short language.

Activities we did in class

To show how to design a set of effective algorithm, we did some activities in and after class. Here are some activities.

Algorithm role-playing. I was the volunteer “robot” in the class  with a coat covering on my head. Being rotated for several turns, I was given the instructions by Catherine in order to reach the bottle on front desk and pass it to Lily. 

For the reason that I cannot look at anything or arrange the route by myself, Catherine was required to give me the instruction as clear as possible. Otherwise I couldn’t reach to the destination, at least couldn’t reach in the most effective way.

See the source image

Paper activities. We pretented us as the tour guide and guide a visiting group in the most efctive routes to all of the sights that were arranged. We realizd the importance of the effectiveness of the instructions.

查看源图像

Algorithm Magic – red black mind meld. For this part, my team did a poker magic trick called red black mind meld with a solid verification logically. the magician(me) followed the special algorithm which may seem random to the audience to achieve a fixed result in the end. The magic show could be successful not because of any sleight of hand or misdirection. Beside, it works every time. All of these are the consequence of a special algorithm.

2

(instructions in the magic show)

(making the math model and the verification)

The instructions inside the algorithm is specific and clear so that anyone can do the correct show by following the algorithm carefully. And the verification uses logical thinking, mathmatical modelling, simultaneous equations and the thinking of abstraction, which has been used in computer science for thousands of times.

See the source image

Lightbot Game, the “best assignment” ever! It is a game for us to create the algorithm by ourselves in order to instruct the robot to lit up all the blue blocks in the game. There are three parts in total. The first unit is a introduction of the operation to the game. By using the arrows which indicate moving forward and the rotation button that represents to the spinning of the robot, the robot moves within the certain algorithm that is set to make sure all the blue blocks are litted up.

The second unit refers to using the fixed model like P1 and P2 to avoid the repeating instructions.  I discovered that if we put P2 into P1, it will be more complicated but the main part could be cut short sometimes.

11

(insert P1 into P2)

In the third part, we learnt that putting P1 into P1 could create the effect of circulation. It could be a little bit hard to think of, but when we are dealing with problems that have lots of repeating units, it could be a really effective way.

14

(illustration of the main idea of putting P1 into P1)

15

(using of the skill for unit 3)

In the final hurdle, I faced to a difficult problem that combines the rotation and circulation together. The quintessence of the solution is to figure out the repeating unit and write it into the P1/P2 procedure. After several times of effort, I discovered a way that divides them into small groups within the limited steps. It tells me the importance of the using of computational thinking and the magic of the algorithm as well.

Conclusion

From these classes, I know the definition of algorithm and its properties as well. What’s more, I know the core of cs: computational thinking. All of this could be used to fix the problem in programming logically, and in daily life as well. I appreciate the magic of the algorithm and I am looking forward to knowing more information of algorithm in the future study.

 

Pre IB CS

Reflection of Sep.30th: inside the computer, CPU and binary

This is an interesting week because we are digging deeper into the inside of the computer and got to know something about the processing procedure inside the computer, which is fanscinating to me. And surprisingly, I finally got to know how to calculate in binary, at least briefly.

1.Inside the computer

Video watching is a really effective way of learning because it is vivid by showing animation and images as the voice appeared behind as well. Through this interesting four-minute video, I learnt how the computer works.

First, the computer can process really rapidly, with the speed of 1 billion bits per second.

(PS: A bit (short for binary digit) is the smallestunit of data in a computer. A bit has a singlebinary value, either 0 or 1. Althoughcomputers usually provide instructions thatcan test and manipulate bits, they generallyare designed to store data and execute instructions in bitmultiples called bytes.)

bits

bits

What’s more, the core of a computer is the CPU. So, what do we know about CPU?

What is a CPU?

CPU, central processing unit, also called as microprocessor, is the electronic circuitry within a compter that carries out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output operations specified by the instructions.

CPU

CPU

structure of  CPU

What does a CPU contain and work with?

The CPU contains three main parts: CU, ALU and Register.

It also works with the CPU clock and CPU bus.

CU, control unit, makes decisions and sends appropriate signals down its lines to other parts of the CPU. It tells other components what to do and decode the instruction is. The CU also controls the timing of operations in the computer and controls the instructions sent to the processor and the peripheral devices.

CU(control unit)

ALU, arithmetic/logic unit, deals with math and logical operations. It carries out arithmetic (calculations) and logic (decision) functionsIt will only do the calculations and tasks that are logical. It cannot memory. (This actually is different with what we did in the role-playing)

ALU(control unit)

Register provides temporary memory storage locations within the CPU. It stores what CPU needs.

Register

BU, carries the message to communicate with other parts of the computer.

BUs

How does a computer/CPU work

CPU fetchs instructions, decodes them tto do calculations and store the results.

Role playing is an efficient way for us to know how a computer works. Students were divided into different groups. Each of the group members has different roles inside the CPU. One CU, one ALU+register, one CPU bus and one clock. And one person to display. In this role play, the ALU was asked to take down the datas on a piece of paper, even though this is in fact done by registers, the tempory memorable part. I learnt that different part follows its own instructions and rules. If any of them make any mistake, the system can hardly access the correst result in the end. Likewise, as a ALU, because one mistake of the minor of x’s value, the result is totally wrong, which cost us long time the fix.

微信图片_20181010231552

result of the rold play process

Binary

To start with, we first distinguished the defination between data and information.

Data:the raw number and facts in the computer score

Information: processed data that people could see and understand. (E.g. GPA and description, picture)

To produce the information, the computer is given the data and process them. Finally, the output comes as the information. But, since the computer only understand number 1 and 0, how do we “communicate” with it? In other words, what is the language of computer?

……

Here comes the term of BINARY!

In mathematics and digital electronics, a binary number is a number expressed in thebase-2 numeral system or binary numeral system, which uses only two symbols: typically0 and 1.

As a number of five volunteers, I represented the number 4. Others were holding 1, 2, 8, 16. as we are turning the paper of numbers, the possibilty of the situations raised and increased. Likewise, when we are turning the cards back to our seats, we found that 0 and 1 could really mean a lot.

Here are the transformation from decimal to binary.

conversion from decimal to binary

We then did some activities of decoding the binary symbols and sending words out as well. We also had a page of homework to let us be more familiar with binary system. All of these activities made us understand the binary system better and can transform it more quickly.

ASCII and Unicode research

ASCII, abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Most modern character-encoding schemes are based on ASCII, although they support many additional characters.

USASCII code chart

Unicode is a computing industry standard for the consistent encoding, representation, and handling of text expressed in most of the world’s wrtiting systems, which is more complicated that the USCII.

unicode

To conclude, the week is absolutely cool because acting for the process in the computer is so vivd, and the binary system is quite magical and fanscinating to me because they looks so simple but can mean a numerous things. So interesting to learn computer science!

 

Pre IB CS

Reflection of Sep.23th: blog, computing system and presentation

Last week, we resetted our blog, learnt the basic knowledge of computing system and the history of computer and did the presentation of the computing system.

1.Preparation

In the blog setting part, we added a category called “Pre-IB” and a sub-category “Pre-IB CS” beneath the main category. We tried to post the first blog on our own website and submitted the website to the Pete.com as an assignment. Even though I submitted a wrong page without the date on the website, I got to know the correct way in the end. And I’ll try to send a right one this time.

process of making the first portfolio

2.Brief introduction of computer and its history

computer

What’s more, the computing system was taught by asking the question: what is a computer in the definition. Obviously, nobody except for Mr. Pete could answer that question, since most of us lacked the attention and consideration on simple things that seemed common in our daily life.

However, after a short video of the computer, we got to know that computer is a device that could do some processing work inside, and transform the input, including the typing or the clicking of the mouse, in to the output, such as the display on the screen.

Another fact of the computer is that it was not invented by an exactly one person, but by the generations of people.

Since the effort from people all over the world and in different ages, the great work was given the birth.

The history of computer briefly consists of five generations:

  • 1st vacuum tubes (01. digital)
  • 2nd transistor (no light)
  • 3rd integrated circuit (many tr inside)
  • 4th microprocessor (put in one chip)
  • 5th AI artificial intelligencegenerations of computer                         generations of computers 

3.computing system

It’s really interesting to discover how the computer works inside its amazing appearance. Well, here is the model of the computing system:

input – process – output

input-process-output

input – output model

The real life examples of this system is like when we are using the calculator, we put in the numbers by typing the buttons on the keyboard. Then the calculator receives the raw data and does some process by using the formulas. Finally the result is shown on the screen of the calculator. Another instance is when we put the dirty clothes into the washing machine, it will wash the clothes during the  processing section and give out the clean clothes as the output.

And the layers of the computing system are as follows:

Information

This is the data representation, meaning raw datas. Information defines the methods and ways how we represent information on a computer. Examples of this are binary numbers, audio and video.

hardware

This includes all the physical components for computers. Examples of this are CPU, gates, transistors, or devices such as mouse and keyboard.

programming

programming layer deals with computer software – programs that uses instructions to process data, perform computation and manages data. The main goal of programs is to solve various problems and perform different tasks. Programs can run on different levels and can be written in different languages. And this layer makes the first two layers work. Examples of this are drivers, firmware.

operating system

The 4th layer of computing systems deals with various operating systems. The main task of operating system (OS) is to manage computer resources. It manages a numerous of instructions. There are various computer systems that help users to communicate and interact with computing system: Windows, Linux, Mac OS, Android and others.This is the resources manager.

The first four layers focus on computers system. Their task is to make computer system work. The rest 2 layers are used to solve specific problems.

applications

This is the application program. Computing systems users run application programs to perform real-world problems, for example – write a text document, draw a picture or play a game. Every program you run on your computer’s operating system is an application program that help you to reach you goals or solve a certain problem. Examples of this are Text editor, Autocad, Counter Strike or Photoshop.

communication

This is to communicate with other systems. Communication layer is a layer where two computer system can operate and exchange date. Computers are connected into a networks to share information and resources.Examples of this are Network programs and applications.

Layers+of+a+Computing+System.jpg

layers of computing system

4. Hardware and software

Hardware is the physical computer equipment including its boxor case, everything in the case and accessories(devices) attached to it: The motherboard, fans, wires, memory, hard drive; graphic, sound and other cards; the monitor, keyboard, mouse, scanners, printers.

Software is the name that evolved for everything in the computer that is not hardware.

5. Group presentation

As the model of the computing system contains: input – process – output,  and the process part contains the storage and the communication/network devices, we were divided into five groups to make a presentation on Friday.

1

https://docs.zoho.com/show/open/a14ybf2f82016cf684fb8a315917c2688b3ab/slide/3634034000000004082   (the website of our ppt)

I was the member of the storage and I showed the knowledge of the SD, which is the short form of secure digital memory card. Here are some screenshots of our group’s ppt. The ppt was actually done on zoho.com and each of the members contributed the whole project.

24

some pages of the powerpoint in the presentation

To sum up, this week was a really interesting week because we gradually get to know the knowledge of the computing system, which is familiar but new to me as well. However, I think I still need to study for my presentation contents by using a variety of the material instead of just study from the Wikipedia. There’s still a long way to go for me to make sure what is a SD card, not just keep introducing the physically size of it, as what I did in the presentation, superficially.

 

Pre IB CS

Reflecion of Sep.14th: typing lesson and setting up the own website

In this class, we first feel the embossing on the letter “F” and “J” on the keyboard. We tried several times to make it more proficiency.

After that we were quite busy on setting our own websites on WordPress.com. We first added the category of Pre-IB and a sub-category called Pre-IB cs into the column of Menu, by pointing “Customize-Menus-Primary-Add Items”. To make the sub-category, we needed to drag the “Pre-IB CS” title a little bit rightward to make it seem as a “sub” title. Then when we turned to “view my site”, the menus renewed.

(I’m not sure why some of the titles are dogged to be in Chinese characters)

Next, we followed Mr. Pete’s instructions to post the blog by pointing the “add” button next to the “Blog Posts”. We could add the pictures and contents freely. The birth of this passage is also due to the procedures above.

Finally, Mr. Pete remind us not to post that much private information on the Internet for our safety, which is indeed a good reminder to me, who had almost finished editing the contacting information on the website.

By the way, thanks to Kevin, the assistant of the last class, who have showed his website to the public on the bigger screen, we all got to know the exactly appearance of the pages and discovered the operations clearly in an easier way.

5.png

Before the ending of the class, we were left with the typing-practice homework. We are supposed to finish the first seven lessons on the typing.com. I believe this could be an efficient way for me to practice the correct typing gestures. Out demand is to reach the speed of 20wpm before the typing test in “blind”. The speed is not challenging to me, while I wish I could use the correct fingers to touch the certain keys next time.

 

DemiZHOU

2018.09.16

Pre IB CS

Reflection of Sep.7th: Intro to IB CS

Last class, we first introduced ourselves and share one happy story happened in summer. I shared the story about buying three cups of milky tea for three people but getting only on straw in the end.

And then Mr. Pete showed us tells us requirements for the following classes. I learnt that we can use some websites like zoho.com to back up our documents so that we can “bring” files everywhere. I also got to know that there is a website called wordpress.com and we can create out blog on it. Mr. Pere told us to change the computer system into English so that we can be forced to learn terminology when we are using the computer. Even though it might be time consuming to get used to it, it indeed helps a lot. However, since some of the problem, I cannot change the display language from the default to English. We’ve tested out typing speed on typeracer.com. When I was typing, I made some of the mistakes like forgetting to change the letter in to capital letters at the beginning of the sentence or incorrectly typing “u” into “i”, which costs lots of time for me to type the paragraph. What’s more, I realized that even though I could type in a fine speed when I’m looking at the keyboard, I cannot type successfully when I’m looking on the screen only. Thus, I need to refine this skill.

图