Julia – Bit by Bit: Programming for Beginners
- Length: 302 pages
- Edition: 1
- Language: English
- Publisher: Springer
- Publication Date: 2021-07-16
- ISBN-10: 303073935X
- ISBN-13: 9783030739355
- Sales Rank: #24517873 (See Top 100 Books)
The main goal of this book is to teach fundamental programming principles to beginners using Julia, one of the fastest growing programming languages today. Julia can be classified as a “modern” language, possessing many features not available in more popular languages like C and Java.
The book is organized in 10 chapters. Chapter 1 gives an overview of the programming process. It shows how to write a first Julia program and introduces some of the basic building blocks needed to write programs. Chapter 2 is all about numbers―integers, floating-point, operators, expressions―how to work with them and how to print them. Chapter 3 shows how to write programs which can make decisions. It explains how to use if and if…else statements. Chapter 4 explains the notion of ‘looping’, implemented using for and while statements. It also explains how to read data from a file and write results to a file. Chapter 5 formally treats with functions, enabling a (large) program to be broken up into smaller manageable units which work together to solve a given problem. Chapter 6 is devoted to characters and strings. In Julia, we can work with them as seamlessly as we do with numbers. Chapter 7 tackles array processing, which is significantly easier in Julia than other languages. Chapter 8 is about sorting and searching techniques. Sorting puts data in an order that can be searched more quickly/easily, and makes it more palatable for human consumption. Chapter 9 introduces structures, enabling us to group data in a form that can be manipulated more easily as a unit. Chapter 10 deals with two useful data structures―dictionaries and sets. These enable us to solve certain kinds of problems more easily and conveniently than we can without them.
This book is intended for anyone who is learning programming for the first time. The presentation is based on the fact that many students (though not all) have difficulties in learning programming. To overcome this, the book uses an approach which provides clear examples, detailed explanations of very basic concepts and numerous interesting problems (not just artificial exercises whose only purpose is to illustrate some language feature).
Preface Contents CHAPTER 1 Elementary Concepts 1.1 Programs, Languages and Compilers 1.2 How a Computer Solves a Problem 1.2.1 Define the Problem 1.2.2 Analyze the Problem 1.2.3 Develop an Algorithm to Solve the Problem 1.2.3.1 Data and Variables 1.2.3.2 Example – Develop the Algorithm For advanced users (may be omitted at a first reading) 1.2.4 Write the Program for the Algorithm 1.2.5 Test and Debug the Program 1.2.6 Document the Program 1.2.7 Maintain the Program 1.3 How a Computer Executes a Program 1.4 Data Types 1.5 Characters 1.6 Welcome to Julia Programming 1.7 A Program With Input 1.8 Writing Output with print/println 1.8.1 The Newline Character, \n (backslash n) 1.8.2 println() 1.8.3 Escape Sequences 1.9 Print the Value of a Variable 1.10 Comments 1.11 Julia Basics 1.11.1 The Julia Alphabet 1.11.2 Julia Tokens 1.11.3 Reserved Words 1.11.4 Identifiers 1.11.5 Some Naming Conventions EXERCISES 1 CHAPTER 2 Numbers 2.1 Introduction 2.2 How to Read Integers 2.3 How to Read Floating-Point Numbers 2.4 Example Average 2.5 Example - Square a Number 2.6 Example Banking 2.7 Example – Football Tickets 2.8 Integers - Int 2.8.1 Integer Expressions 2.8.2 Precedence of Operators 2.8.3 Print an Integer Using a Field Width 2.9 Floating-point Numbers 2.9.1 Print Float64 and Float32 Variables 2.9.2 Assignment Between Float64 and Float32 2.9.3 Floating-point Expressions 2.9.4 Mixed Expressions 2.10 Assignment Operator 2.11 Updating Operators 2.12 trunc, ceil, floor, round trunc ceil floor round EXERCISES 2 CHAPTER 3 Selection Logic 3.1 Introduction 3.2 Boolean Expressions 3.2.1 AND, && 3.2.2 OR, || 3.2.3 NOT, ! 3.3 The type Bool 3.4 The if Statement 3.4.1 Find the Sum of Two Lengths 3.5 The if...else Statement 3.5.1 Calculate Pay 3.6 On Program Testing 3.7 Symbolic Constants 3.8 The if…elseif…else Statement 3.8.1 Print a Letter Grade 3.8.2 Classify a Triangle EXERCISES 3 CHAPTER 4 The for and while Statements 4.1 Introduction 4.2 The for Statement 4.2.1 Multiplication Tables 4.2.2 Temperature Conversion 4.3 The Expressive Power of for 4.4 break/continue in for 4.5 Read Data From File 4.5.1 Keep a Count 4.5.2 Find Average 4.6 Find Largest Number 4.6.1 Find 'Largest' Word 4.6.2 Find Longest Word 4.6.3 Find Smallest Number 4.7 Nested for Statement 4.8 Read Data From File, Cont'd File Pointer 4.9 The while Statement 4.9.1 Sum of Numbers (Prompt) 4.9.2 Sum, Count, Average (Prompt) 4.9.3 Greatest Common Divisor 4.10 Send Output to a File close(out) 4.11 Payroll 4.12 break/continue in while EXERCISES 4 CHAPTER 5 Functions 5.1 Introduction 5.2 Function Basics 5.2.1 How an Argument Is Passed to a Function 5.3 Function Examples 5.3.1 How to Swap Two Variables 5.3.2 Yesterday, Today and Tomorrow 5.3.3 GCD, Greatest Common Divisor 5.3.4 Using GCD to Find LCM 5.3.5 Factorial and Big Integers 5.3.6 Combinations 5.3.7 Calculate Pay 5.3.8 Sum of Exact Divisors 5.3.9 Perfect, Abundant or Deficient 5.3.10 Letter Position in Alphabet 5.4 Introduction to Recursion 5.4.1 GCD, Greatest Common Divisor 5.4.2 Fibonacci Numbers 5.4.3 Decimal to Binary 5.4.4 Towers of Hanoi 5.4.5 The Power Function 5.4.6 Find Path Through Maze Write the program EXERCISES 5 CHAPTER 6 Characters & Strings 6.1 Character Sets 6.2 Character Constants and Values 6.3 The Type Char 6.4. Some Char Functions 6.4.1 Uppercase To/From Lowercase 6.5 Read and Print Characters 6.6 Count Space Characters 6.7 Compare Characters 6.8 Echo Input, Number Lines 6.9 Convert Digit Characters to Integer 6.10 String Basics Print a String, %s 6.11 Compare Strings cmp - compare two strings 6.12 Index Into a String 6.13 Example Sum of Distances 6.14 Concatenation 6.15 Example - Get Words From Random Data 6.16 Example - Palindrome 6.17 A Flexible getString Function 6.18 Example - Geography Quiz Program 6.19 Other String Functions 6.19.1 findfirst 6.19.2 findlast 6.19.3 findnext 6.19.4 findprev 6.19.5 occursin 6.20 Array of Characters 6.21 For the Curious Reader EXERCISES 6 CHAPTER 7 Arrays 7.1 Introduction 7.2 Simple vs Array Variable 7.3 Array Declaration 7.4 Store Values in an Array 7.5 Average and Differences from Average 7.6 Letter Frequency Does the file exist? 7.7 Array as Argument to a Function 7.8 Name of Day Revisited 7.9 Find Largest, Smallest in Array Find smallest 7.9.1 min, max, minimum, maximum 7.10 A Voting Problem 7.10.1 How to Handle Any Number of Candidates 7.10.2 How to Sort the Results Sort by last name EXERCISES 7 CHAPTER 8 Searching, Sorting and Merging 8.1 Sequential Search 8.2 Selection Sort 8.2.1 Analysis of Selection Sort 8.3 Insertion Sort 8.3.1 Analysis of Insertion Sort 8.3.2 Sort Unlimited Data 8.4 Sort Parallel Arrays 8.5 Binary Search 8.6 Word Frequency Count 8.7 Merge Sorted Lists EXERCISES 8 CHAPTER 9 Structures 9.1 The Need for Structures 9.2 How to Write a struct Declaration 9.2.1 Pass struct as Argument to a Function 9.3 Array of Structures 9.3.1 Sort struct Array 9.4 Nested Structures 9.5 Fractions 9.5.1 Manipulate Fractions 9.5.2 Rational Numbers 9.6 Voting Problem Revisited 9.6.1 On using isless in sort EXERCISES 9 CHAPTER 10 Dictionaries and Sets 10.1 Dictionaries 10.1.1 Letter Frequency 10.1.2 Dict Functions - haskey, in, delete! 10.2 Sets 10.2.1 Set Operations union union! intersect and intersect! delete! Relational operators applied to Sets setdiff and setdiff! 10.2.2 Find All Unique Words 10.3 Thesaurus 10.4 Scrabble Duplicate Tiles EXERCISES 10 Appendix A Install Julia/Atom/Juno Install and run Julia Install Atom and Juno Running Programs Index
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.