Computer Science Programming in
Rubby Language. This Basic Computer book will guide you about both concept that
What is Computer science and what is Computer programming. So this book is
really best guide line and instructive for the Computer Programmer. Computer
science introductory texts are often unnecessarily long. Many exceed 500
pages, laboriously
describing every nuance of whatever programming language they are using to
introduce the concepts. There is a better way: a programming language that has
a low entry barrier. Preferably,
the language selected
should be a real, widely used language with a subset that is powerful and
useful, yet mercifully small. Such a choice should arm the readers with marketable
tools. The esoteric details of the programming language, however, should be
ignored but with pointers for future investigation provided. Ruby is a
programming language well suited to this task. It is object-oriented,
interpreted, and relatively straightforward. More so, instead of being purely
educationally oriented, its popularity in industry is steadfastly growing. Our
book should be covered in sequential fashion. Each chapter assumes that the
material from the preceding chapters has been mastered. To focus the
discussion, we ignore gory details, such as user interface design and
development issues, that we believe are
ancillary to the core of
computer science. Such issues should be, and are, covered in depth in a variety
of subsequent courses. Our target audience is students and practitioners who
wish to learn computer science using Ruby rather than just how to program in a
given language. This book consistently emphasizes why computer science is
different from computer programming. Students and practitioners must understand
what an algorithm is and what differentiates differing algorithms for the same
task. Although we are living in an era of growing computational resources, we
are also living in a world of growing data sets. Data amass every day; thus,
efficient algorithms are needed to process these data..The following
are the main Contents.
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1. Introduction to Computer Science. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . 1
1.1 Introduction 1
1.2 Application
Development 2
Step 1: Understand the
Problem 2
Step 2: Write Out the
Solution in Plain Language 3
Step 3: Translate the
Language into Code 3
Step 4: Test the Code in
the Computer 4
1.3 Algorithms 4
1.3.1 Algorithm
Efficiency 5
1.4 Summary 6
1.4.1 Key Concepts 6
1.4.2 Key Definitions 7
1.5 Exercises 7
2. How Does the Computer Really Work?. . . . . . . . . . . . . .
. . . . . . . .. . . . . . . . . . 11
2.1 Introduction 11
2.2 Basic Nomenclature
and Components of a Computer System 11
2.3 Scales of Magnitude
14
2.4 Instruction Execution—Speed
and Timing Scales 16
2.5 Bit Strings and Their
Meaning 17
2.6 The Interpreter
Process and Ruby 19
2.7 Summary 21
2.7.1 Key Concepts 21
2.7.2 Key Definitions 22
2.8 Exercises 22
3. Core Programming Elements. . . . . . . . . . . . . . . . . .
. . . . . . . . . . .. . . . . . . . . . . . 23
3.1 Introduction 23
3.2 Getting Started 24
How to Install Ruby 24
How to Save Programs 24
3.3 What Is a Variable?
24
Constants: Variables That
Never Change 26
Data Types 26
Integer 27
Float 27
Strings 28
Booleans 28
3.4 Basic Arithmetic
Operators 28
3.5 Input and Output 31
Output Using Variables 31
Display User Input 32
Basic Programs 32
Step 1: Understanding the
Problem 32
Step 2: Write Out the
Problem in Plain Language 33
Step 3: Rewrite the Plain
Language into Code 33
Step 4: Test the Code in
the Computer 34
3.6 Common Programming
Errors 34
Syntax Errors 34
Logic Errors 35
3.7 Mixing Data Types 36
3.8 Summary 36
3.8.1 Key Concepts 36
3.8.2 Key Definitions 37
3.9 Exercises 38
4. Conditional
Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 41
4.1 Introduction 41
4.2 Flow of Execution 41
Logic Flow 41
4.3 Conditional Control
42
Control Flow 45
4.4 If-Then-Else
Statements 46
Testing Conditional Flow
48
Elsif Statements 49
4.5 Case Statements 51
4.6 Debugging 52
4.6.1 Alternative Styles
of Debugging 54
4.7 Summary 55
iv |
For
User easiness we upload the Book on Two links. One link is Yellow Color Name :Download Book from Link A:and the Other is Black Color Name:Download
Book From Link B: You can read also this book Online from any one Link which are
mention above.If one link is not working proper then you may definitely
download book from other alternative link which is mention above. If you like
this book then please leave COMMENTS without any hesitation about
this book. Your comment will show about your like and dislike about this
book. Thank You.
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
ReplyDeletewebsite: geeksforgeeks.org