Pre-IB Computer Science

COMPUTER SCIENCE #WEEK 8 #

Welcome

It is November now. These two weeks we are still learning about algorithm. Pseudocode, flowchart, natural language and programming language are expressions for algorithm. We lay stress on flowchart these two weeks. We learn what flow chart is and we know how to draw a flowchart.

Flowchart

A flowchart is a type of diagram that represents an algorithm, it illustrates a solution model of a given problem. It shows the steps in various types of boxes which are connected with arrows. Pseudocode and flowchart can be transformed from each other. As pseudocode, flowchart also has its rules and symbols.

Flowchart Rules

Flowchart begins with a “trigger” event. The direction of the chart must be left to right and top to bottom. A flowchart must have logical start and begin. There should be only ONE flow line comes out from a process symbol. There should be only ONE flow line that enters a decision symbol but there should be two lines that comes out from a decision symbol.

Flowchart Symbols

The picture that are shown below are symbols of start and end. It is a kind of oval.Start-And-End-Symbols-in-a-Flowchart

A rectangular shape represents a process. When people want to change form, value and location, the processes are happened in rectangles. Selection (decisions) is represented as a diamond shape. Input and output are entered in parallelogram shapes.pict--process-flowchart-symbols-design-elements---process-flowchart.png--diagram-flowchart-example

Statements in Flowchart

IF: A diamond shape and one parallelogram shapes.

IF-ElSE: A diamond shape and two parallelogram shapes.

IF-ELSE-IF: More than one diamond shape and more than two parallelogram shapes. There will outcomes due to different situations.

NESTED-IF: A diamond shape has another diamond shape as an output. (A diamond shape nests in another diamond shape.)

WHILE LOOP: After a diamond shape, it has a loop back to the step before the diamond shape rather than go direct to the output. (on the left)

DO-WHILE LOOP: After a diamond shape, it has a loop back to the step before the diamond and several processes. (on the right)

Abstract and Concrete Steps

Abstract step is an algorithm that contains unspecific details or important details. Concrete step is an algorithm step that has contains all specific details.

Strategies

In computer science, divide and conquer is an algorithm. Divide and conquer algorithm is worked by dividing a problem into two or more than two sub-problems of the same related type. It can be applied over and over again until all sub-problems have been solved or managed. The solution to sub-problems are combined to give a solution to the original problem.

1.Analyze a problem 2.List the main tasks 3.Writing the modules  4.Re-sequence and revise as necessary OR Check again

Reading Assignment   (https://www.bbc.co.uk/education/guides/zp92mp3/revision)Screen Shot 2017-11-04 at 2.04.42 PM.png

After reading the webpage, I eventually understand what computational thinking is. Computational thinking is not just programming. It is the thought processes involved in formulating a problem and expressing a solution in a way that both human and computers can carry out. There are four significant of computational thinking. They are decomposition, pattern recognition, abstraction and algorithms. Decomposition is to divide a complex problem into small units which simplifies the complex problem. Pattern recognition is to find the similarities among those small units. Abstraction means only to focus on important details and ignore unrelated information. Algorithms are simple instructions to solve a problem step by step.

Activities

This slideshow requires JavaScript.

Grade 10, Pre-IB Computer Science

#COMPUTER SCIENCE# WEEK 6

Welcome

This is the third week of October. During this week’s Computer Science class, we are still learning about algorithm. We did several projects to know how algorithm works. On the second class of this week, we saw few videos to know how to know several expressions of algorithm and how to solve problems.

Algorithm Properties: Finiteness  Definiteness  Input  Output  Effectiveness

In a algorithm, there must be finite number steps. Each step must be definitely precise. The actions need to be strict. There need to be an input before algorithm begins. Outputs are quantities related to inputs. All steps in algorithm must be sufficiently basic and they can be done in finite time.

Understanding a problem

There are several factors that we need to concern: What is the input? What will be the output? What will be the order of instructions ? What decisions should be made in order to solve the problems ? Are any part of the task repeated?(a loop can be created in the situation)

Activities

During the first class of this week, we did two activities to learn how to design a algorithm. The first activity was a student with his eyes covered with something that he could not see anything was listened to another student’s instructions to get to the appointed tile and he should avoid step on the tile that has a marker. By the activity, I learn that the instructor should say the instructions step by step. The instructions must be clear. For example, he should say how long the student should step froward instead of saying a big step or a small step. The algorithm should try to be simple as far as possible.

The second activity was to write how to boil an egg within the group. By this activity, I know that when designing a algorithm, we should not forget any steps. If we forget even a step, the result will change. We should be strict at every step in the algorithm.

Game

This week we did a interesting game on the computer. It is a game that we design the algorithm to make the little robot on the screen light all blue squares. It is really funny. By this small game, I know more about algorithm and how to design it. There are simple ways and difficult ways to reach the same aim.

Screen Shot 2017-10-22 at 10.11.54 PMScreen Shot 2017-10-22 at 9.12.52 PMScreen Shot 2017-10-22 at 8.50.37 PM

Algorithm

Algorithm is instructions of all problems. It is a general solution. There are both easy algorithms and difficult algorithms for a problem. For example, the problem is counting the number of people in a room.

 

Let N=0

For each person in room

Set N=N+1                But it is not efficient to count a person once a time.

Let N=0

For each pair of people in room

Set N=N+2                Buggy odd number people

Let N=0

For each pair of people in the room

Set N=N+2

If there is remains a person

Set N=N+1

So when we design a algorithm, we should consider all conditions in case of bugs.

Expressions for algorithm

Natural language(simple language description)                                                                                             Flow chart(formalized graphic representation, a type of diagram)     flowbreeze-order-flowchart

Pseudocode(an informal high leveled description)        

Programming language(formal language to specify a set of instructions)

Pseudocode

It is a planning tool that allow us to design the flow of a program prior to writing the code. It consists of a series of English-like statement that describe a task or algorithm. There are several common notation used in pseudocode.

A==9     A equal nine

A=9      Sign 9 to A

Input:  Read, obtain, get

Output: an output will shown on the screen

While: a loop

For: a counting loop

Repeat-Until: a loop that has conditions at the end of it

If-Then-Else: a decision when a choice is made

Screen Shot 2017-10-23 at 5.28.20 PM.png

Languages1.png

Pseudocode

Begin

Input a number

While the number is between 0 and 30

If it is between 0 and 20

If it is between 0 and 10

Output the word red

Else

Output the word blue

End if

Else

Output the word green

Else

There is no a correct color option

End if

Stop

Begin

Input a number <the number is between 1 and 100( include 1 and 100)>

If it can be divided by 5 and there is no remain

Print the number

Else

No print

End if

Stop

Grade 10, Pre-IB Computer Science

#COMPUTER SCIENCE # WEEK 5

Week 5

Welcome!

This is the second week of October and this is the first week of school after the golden week. We learn new things during this week. We learned and discussed algorithm. We have watched two videos,“What is an algorithm?” and “The Secret Rules of Modern Living: Algorithms”, to get information about algorithm.google-blueg-algorithm-seo-ss-1920

Algorithm

Algorithm is specific instructions to solve problems and get it done. It is a set of step by step, clear instructions in order to solve a problem. It can perform calculation, data processing and automated reasoning tasks. It seems that it only appears in calculation but it appears almost everywhere around the world. It also ruling our lives. It is byte-sized (eight bits of one and zero). It can always be finished and it can be proven that it can work in all cases of one type of problem. It is general solution of a problem. Here are several examples in the video.

Properties: Finiteness  Definiteness  Input  Output  Effectiveness

algorithm-512

Examples

Face detection algorithm is a type application that is used every day now. The problem is to find people’s faces, to locate human faces in a scene. It is methodically scanning the figures.

Chili game algorithm is a type of algorithm used when playing chili game. Chili game is that there are 13 chilis and two people are involved in each time. Two people take chili by turns but they can only take one or two chilis. The person who takes the last chili lose the game. The algorithm is that to ensure that you and your partner take totally three chilis. Then the last chili must be taken by your partner.

Pagerank ranking algorithm is established by two young men. In 1998, Larry Page and Sergey Brin who are founders of Google established it. It is a ranking system used in Google Search to rank websites in their search engine results. It works by incoming links to the page and determine how important those links are. They determine it by counting how many times people click it. This algorithm also becomes common in people’s lives.

Sorting algorithm is putting things in order. It moves elements in final position but one at a time. It moves element by comparing two adjacent elements. It is really slow when there are many elements. Bubble sorting algorithm is a easier way to sort things. It splits everything into small groups. It repeat the project over and over stop until there are no pairs to swap.

Stable match algorithm (stable marriage problem)Screen Shot 2017-10-16 at 9.56.31 PM

Algorithm really plays a significant role in people’s lives. Before I do not think that algorithm would be used in people’s daily lives. But now I know that it appears almost everything in all over the world. There are many things that use algorithm.

Grade 10, Pre-IB Computer Science

# Computer Science Week 4

Welcome!😊

Welcome!

This is the forth week of computer science class. It is also the last week of September. We have watched the video of the inside part of our computer. We did a role-play of a CPU and we learnt to convert to and from decimal. We also took a test of typing skill in the second class of this week.

Inside a ComputerbgxECUg

During the class, we watched a video. After watching the video clip, everyone in the class shared about what they had learned about the inside of a computer. I learnt a lot that I did not know it before. Computer is an object can accept input and produce some output. CPU(central processing unit) is the control unit of a computer. It makes decisions and sends appropriate signals down to other parts of the CPU. It also controls the timing of operations in the computer and controls the instruments sent to the processor. ALU(Arithmetic Logic Unit) carries out calculations and logic functions. Registers provides temporary memory storage locations in the CPU. During the class, we also imitate how the inside part of a computer works. Every student was involved in the activity and we could not say a word during the activity. I was a CU(control unit) and I sent messages to the data buses. Then the buses sent the messages to ALU. ALU calculated and sent the it to Display. Finally the Display plotted the x, y value on the display card. CU clock recorded the times we worked. The process was the exactly the way how a computer works inside. I found that it was difficult and it was easy to make mistakes. One little mistake would affect a lot. We must be really careful when we did the process.th

Typing Test

During the second class, we took the first typing test during the semester. Although I still did not reach the standard, but I improved a lot. I still need a lot of practice to reach the standard in the next typing test next month. I also practiced my typing skill this week.

week 4.png

Binary Number System

A computer converts its data to information. The data in a computer are stored only in two numbers, one and zero. We learned how to convert decimals to binary number system by roleplaying in the class. We used five cards, 1, 2, 4, 8, 16, and we could make all kinds of number under 31. We could change it to binary number by flipping cards. We also do some activities to know binary number system. We also do a presentation this week which is about unicode.

Screen Shot 2017-10-11 at 8.01.25 PM

My friends birthday  (Converting it in binary)

2.22   10.10110

10.7   1010.111

1.18   1.10010

12.20  1100.10100

3.23   11.10111

 

Grade 10, Pre-IB Computer Science

#COMPUTER SCIENCE Week 3

WELCOME!

The third week of Computer Science
It is the third week of the school. It is also the third week that we have taken Computer Science Class. Computer Science is becoming more interesting. We are not only study computer skills, but also study knowledge of computer.

Presentation

Each group had made a presentation of “I think computer is…” on Zoho, last weekend. During the first class, we learned how to publish a presentation on the website. The process is amazing. Before that class, I thought presentation could only be seen by people who made it or shared with people you know. And I never knew that presentation could also publish on the website. People around world who knew the URL can see the presentation.

presentation 2
Click the picture to look at my presentation

Computing System
We also learned something about computing system, hardware and software. There are six layers of computing system which involves information, hardware, programming, operating systems, application, commuting systems. We know that a computer receives an input, processes the information, then performs an output. For example, the way people get energy: input – food that people eat, process – people digest food in their bodies, output – people get energy that they need. Hardware is the physical elements of a computing system. Software is the programs that provide instructions for a computer to execute. I also make a presentation of commutation system this weekend with my group mate, Matthew.

Computer History
We learned the history of computer last week by watching few videos. Computer are invented by many people. There was no a certain person who invented the computer. They influenced each other and inspired each other. Computers are improved as time goes. Nowadays, computers are much better than what it were in the ’70s. Computers are more convenient these days.

typing 3Typing
This weekend, I also learned how to type on typing.com. I eventually finished lessons for beginners. We are going to have a typing test next week. I hope I can pass the test and I could have a satisfied grade. I believe the lessons I took will help a lot in next week typing test.

Grade 10, Pre-IB Computer Science

Second week of CS

Welcome!

I Think Computer Is presentationScreen Shot 2017-09-19 at 10.03.26 AM

Click on my picture to view my presentation.

This is the second week of school and we took computer science classes. During this week’s Science Computer Class, we learnt how to publish a blog. We have written a blog last weekend. And during the first class of this week, we published a blog on wordpress.com. We showed our first week work on the blog. It is my first time to publish a blog online. We also had pictures on our blogs.I felt it was really interesting.

On the second class, we learnt to use the presentation on zoho.com . We have a group and my group mate is Doris. I shared the presentation with her. So I can see how she deals with the presentation and so do she, at the same time. It is mysterious and interesting. I feel it is really funny. We also download the installed Zoho desktop application to save files.

This weekend I also practice my typing on the website. I practice how to type L,O,K,T,V,B,H,A correctly. At first I could not even finish my typing at the first class. After two weeks practice I really improve. Although it is not a great progress, I am really happy to see my little progress. I think I improve my skills of typing by practicing it on the website every week. I really hope that I can type more quickly and more accurate after the lessons. I also do my presentation this weekend on ZOHO. The topic is ‘I Think Computer Is’. I have put some pictures on it. Although it looks not as marvelous as others, I work really hard on it. I realize that I need to improve all kinds of computer skills, not only typing, but also making presentation.

I really have fun during computer science class.typing.com 2.pngScreen Shot 2017-09-19 at 10.12.05 PM

Grade 10, Pre-IB Computer Science

Introduction To CS

Welcome

We had our Computer Science class this week, it is the first week in this semester.I think it is quite fun in this class.I always want to prove my computer knowledge and I am glad that I choose this class.
In the first class, we introduced ourselves and talked about our hobbies.We also enrolled several new accounts.In the second class, we tested how fast we can type.I am not really a fast typer, especially when I touch type.I even could not finish the work when I did the TypeRacer.I hope I can type much more faster after this semester.
There is another website for us to practice typing is typing.com.We can learn how to type correctly on the website.I have never learned it before.There are also many lessons on it. After practicing on it, I can type with correct posture. Before this class,I always type with wrong postures.The practice is so useful.I will practice more.I believe I can improve my computer skills after the class.

typing.com
My progress on Typing.com.
typeracer
My progress on typeracer.