x > Array.new(5) [nil, nil, nil, nil, nil] > x = Array.new(5)

Slides:



Advertisements
Similar presentations
EXEMPLO DE REMOÇÃO ARVORE if (T = nil) then begin writeln ('ELEMENTO NAO ENCONTRADO NA ARVORE'); end else begin if (X.ch < T^.elem.ch) then.
Advertisements

Dependent Types in Practical Programming Hongwei Xi Oregon Graduate Institute.
XkFKP0KP01KP012K X0F0... X1F1P01.. X2F2P02P012. X3F3P03P013P0123 P0,...,k+1(x) = (x−xk)P0,...,k−1,k+1(x)−(x−xk+1)P0,...,k(x) _______________________________________________________.
FUNCTIONS TABLES No calculatorsGRAPHSROOTS FACTORED.
Learning Ruby - 2 Ruby Arrays and Lists. Ruby Arrays are Cool! We've already seen a Ruby array – song_lines Ruby arrays shrink and grow dynamically -
Arrays (1) You create an array in LISP by using the function (make- array ). All elements are initially set to nil. To create a 1-dimensional array of.
Let val x = 3 val y = x val z = 3 val u = ref x val v = ref 3. Top x y z u v
Parallel prefix sum computation Lecture 7. 2 Prefix sum.
You A (L) A1 (L) A2 (R) B (R) B1 (L) B2 (R)
What’s the best one for you?. Positives of Credit Cards Credit cards let you buy items without using your own money They are easy to take overseas and.
Quiz 2 [answer in the back] 2. Two line segments: S1: (1,2) to (5,6) S2: (3,5) to (7,3) Compute the intersection 3. Explain the complexity for line segment.
Robert W. Hasker, Blocked  Previous uses of blocks  words.each { |w| puts “word: #{w}” }  words.find { |x| x.size > 2 }  Voter.where {
And other languages….  Array literals/initialization a = [1,2,3] a2 = [-10..0, 0..10] a3 = [[1,2],[3,4]] a4 = [w*h, w, h] a5 = [] empty = Array.new zeros.
Report Haiyong Wang. Outline A brief introduction to Chef A brief introduction to Ruby Latching VS Locking.
Cryptology Tim Cahill Ryan Church.
Warm-up Find the solutions to the polynomial equation.
Quarter 1 Test 3 Review X. Mental Math: Multiplying & Dividing with Whole Numbers with Whole Numbers XI. Mental Math: Multiplying & Dividing with Decimals.
Linear Interpolation. Linear interpolation Linear interpolation is using a straight line connecting two data points to predict any data point in between.
Fractions, Decimals, and Percents 9.1 Nils Gombas.
ARRAYS Lecture void reverse (int x[], int size) { int i; for (i=0; i< (size/2); i++) temp = x[size-i-1] ; x[size-1-1] = x[i] ; x[i] = temp;
Game Programming Step-08 Learn to Load models *.x file into the game.
1 GL trial balance check balance-brought-forward D … standard D … account balances period’s changes D – debit C - credit Check if sections.
Current Assignments Project 3 has been posted, due next Tuesday. Write a contact manager. Homework 6 will be posted this afternoon and will be due Friday.
生产者一级消费者 二级消费者 1 、写出花坛中有可能出现的食物链,并用 连接植物、动物名 称 2 、试一试, 还可以怎样写, 来表示它们之间的关系呢 ?
义务教育课程标准实验教科书一年级语文下册. 你 还记得描写春天的词语吗? 柳绿花红 莺歌燕舞.
Robert W. Hasker,  Previous uses of blocks  words.each { |w| puts “word: #{w}” }  words.find { |x| x.size > 2 }  words.select { |x| x.size.
Algebra 2 cc Section 3.3 Relate zeros (roots), factors, and intercepts of polynomial functions Consider the quadratic function f(x) = x 2 – 2x - 8 Zeros.
Break Even Diagrams Break Even point is when a firms total costs are the same as revenue At break even point the firm is making no profit, and is also.
Summary Latch & Flip-Flop
Romberg Rule Midpoint.
Lecture 7-2 : STL Iterators
Robert W. Hasker, Blocked Ruby.
TOLL FREE CONNECTION COMPARISON BSNL - Airtel
The Environment Model*
. N=n => width = 1/n US = =1/n3[1+4+9+….+n2] US =
Classes, Objects, And Variables
Π: nil d: 0 π: nil d: ∞ 2 A B -1 π: nil d: ∞ C D E 4 π: nil d: ∞ π: nil d: ∞
Ambulatory Plastic Surgery: High Standards Set by Plastic Surgeons
2006 IEEE World Congress on Computational Intelligence, International Joint Conference on Neural Networks (IJCNN) Evolutionary Search for Interesting Behavior.
JavaScript Functions and Arrays
Lecture 7-2 : STL Iterators
Preface Anesthesiology Clinics of North America
Find the curl of the vector field. {image}
تجزیه و تحلیل تصمیم گیری
Nils Petter Skirstad Statistics Norway
Liquid Common Lisp On Suns.
Find the curl of the vector field. {image}
Mobile Robot Kinematics
Interactive optimization for early-stage urban planning
PREFACE Neurologic Clinics Volume 16, Issue 2, Pages xi-xii (May 1998)
PREFACE Clinics in Sports Medicine
Lecture 8-2 : STL Iterators and Algorithms
Position Vectors Distance between 2 points
[ Хэвлэлийн бага хурал Өмнөговь аймгийн Нийгэм, эдийн засгийн байдал
Ruby Containers, Iterators, and Blocks
Introduction to Algorithms: Dynamic Programming
CSE Dept. Semester Result Analysis
CSE2331/5331 Topic 7: Balanced search trees Rotate operation
Design a TM that decides the language
Flow of Probabilistic Influence
Блум таксономиясы оқушылардың функционалдық сауаттылығын дамытуда оқыту табыстылығын бағалау әдістемесі ретінде.
Preface Clinics in Laboratory Medicine
Ticketing system design review
All Pairs Shortest Path Examples While the illustrations which follow only show solutions from vertex A (or 1) for simplicity, students should note that.
Estimates Made Using Sx
Japanese Society of Periodontology Conflict of Interest Disclosure
Cell Culture Engineering XI
தேய்மானம் வரைவிலக்கணம் Definition of Depreciation
X T O ΞΘΩ ΞΘΩ ΞΘΩ XI THETA OMEGA CHAPTER
Presentation transcript:

x > Array.new(5) [nil, nil, nil, nil, nil] > x = Array.new(5) nil nil [nil, nil, nil, nil, nil] > x[1] = 999

x > Array.new(5) [nil, nil, nil, nil, nil] > x = Array.new(5) nil 999 nil [nil, nil, nil, nil, nil] > x[1] = 999 999 >

x > [1,2,3,4,5] [1, 2, 3, 4, 5] > x = [1,2,3,4,5] 1 2 3 4 5 1 2 3 4 5 [1, 2, 3, 4, 5] > x[1] = 999

x > [1,2,3,4,5] [1, 2, 3, 4, 5] > x = [1,2,3,4,5] 1 999 3 4 5 1 2 3 4 5 [1, 2, 3, 4, 5] > x[1] = 999 999 >

y x > y = [1,2,3,4,5] [1, 2, 3, 4, 5] > x = [1,2,3,4,5] 1 2 3 4 5 1 2 3 4 5 [1, 2, 3, 4, 5] > x[1] = 999

y x > y = [1,2,3,4,5] [1, 2, 3, 4, 5] > x = [1,2,3,4,5] 1 999 3 4 5 1 2 3 4 5 [1, 2, 3, 4, 5] > x[1] = 999 999 > y[1] 2 >

y x > y = [1,2,3,4,5] [1, 2, 3, 4, 5] > x = y 1 2 3 4 5 [1, 2, 3, 4, 5] > x[1] = 999

y x > y = [1,2,3,4,5] [1, 2, 3, 4, 5] > x = y 1 999 3 4 5 [1, 2, 3, 4, 5] > x[1] = 999 999 > y[1] 999 >

x 0> x = Array.new(5) [nil, nil, nil, nil, nil] 0> nil

x 0> x = Array.new(5) [nil, nil, nil, nil, nil] 0> x[1] = Array.new(3) nil [nil, nil, nil] 0> x[1][2] = 999 nil

x 0> x = Array.new(5) [nil, nil, nil, nil, nil] 0> x[1] = Array.new(3) nil [nil, nil, nil] 0> x[1][2] = 999 999 0> nil 999

0> x = Array.new(5) [nil, nil, nil, nil, nil] 0> x nil

0> x = Array.new(5) [nil, nil, nil, nil, nil] 0> for i in 0..x.size-1 1> x[i] = Array.new(3) 1> end 0..4 0> x nil nil nil nil nil