Chapter 5 notes computer science
Q1 define programming language? What are the most commonly used programming languages?
The languages that are used to write a program or set of instructions are called "Programming
languages". Programming languages are broadly categorized into three types − Machine level
language. Assembly level language. High-level language.
Q2 differentiate between the types of programming languages
Both High level language and low level language are the programming language’s types. The
main difference between high level language and low level language is that, Programmers can
easily understand or interpret or compile the high level language in comparison of machine or
low level language.
Q3 how do you install python on your computer?
1. Step 1 − Select Version of Python to Install. ...
2. Step 2 − Download Python Executable Installer. ...
3. Step 3 − Run Executable Installer. ...
4. Step 4 − Verify Python is installed on Windows. ...
5. Step 5 − Verify Pip was installed.
In book the installation of python is describe in detail also read it and try to follow the steps
Q4 how do you create and run a python program.
The most basic and easy way to run a Python script is by using the python command. You need
to open a command line and type the word python followed by the path to your script file like
this: python first_script.py Hello World! Then you hit the ENTER button from the keyboard, and
that's it.
Q5 how do you use blocks to create a script in scratch?
To use my blocks in Scratch, just click on the “My Blocks” button which is a pink-colored circle
available on the left side of the screen, and then click on the “Make a Block” option to create
your own customized block. What is the advantage of running scripts and code without a screen
fresh in Scratch?
Q6 can you give some examples of different types of blocks that are available in scratch?
Blocks
Computer programs are sets of commands, which we use to explain to the computer how to
complete a certain task or solve a problem. Given that most programming languages are
textual, developers often type commands.
In the visual programming language Scratch, we don’t write commands, but instead we use
blocks, which represent them. We create programs by arranging (stacking) blocks in the
appropriate order.
Chapter 4 question and answers
Q 1. Define conditionals and describe their types.
Conditionals describe the result of a certain condition. The if clause
tells you the condition (If you study hard) and the main clause tells you
the result (you will pass your exams). The order of the clauses does
not change the meaning. If you study hard, you will pass your exams.
Q2.what are algorithms used for?
An algorithm is a procedure used for solving a problem or performing a computation. Algorithms
act as an exact list of instructions that conduct specified actions step by step in either hardware-
or software-based routines. Algorithms are widely used throughout all areas of IT.
Q3.what is the purpose of a flow chart ? illustrate the shapes used in
drawing flow chart?
A flowchart is simply a graphical representation of steps. It shows
steps in sequential order and is widely used in presenting the flow of
algorithms, workflow or processes. Typically, a flowchart shows the
steps as boxes of various kinds, and their order by connecting them
with arrows.
Q4.explain the concept of nesting using an example.
Nesting is the placement of one or more objects within another object.
For example, when referring to a computer, nesting may refer to
inserting a graphic image into a word processor. 2. With computer
programming, a nested function is a function contained inside of
another function in the source code of a program.