Then I use the monthArray and put the index/subscript/pointer in square bracketts to define the specific one that can be referenced by that name with that.

Slides:



Advertisements
Similar presentations
Introduction to JavaScript Please see speaker notes for additional information!
Advertisements

For loop. Exercise 1 Write a program to have the user input three (3) numbers: (f)rom, (t)o, and (i)ncrement. Count from f to t in increments of i, inclusive.
This is a while loop. The code is done while the condition is true. The code that is done is enclosed in { }. Note that this program has three parts: Housekeeping.
Request Dispatching for Cheap Energy Prices in Cloud Data Centers
SpringerLink Training Kit
NHỮNG VẤN ĐỀ NỔI BẬT CỦA NỀN KINH TẾ VIỆT NAM GIAI ĐOẠN
Điều trị chống huyết khối trong tai biến mạch máu não
BÖnh Parkinson PGS.TS.BS NGUYỄN TRỌNG HƯNG BỆNH VIỆN LÃO KHOA TRUNG ƯƠNG TRƯỜNG ĐẠI HỌC Y HÀ NỘI Bác Ninh 2013.
Bayesian Confidence Limits and Intervals
Current State of Japanese Economy under Negative Interest Rate and Proposed Remedies Naoyuki Yoshino Dean Asian Development Bank Institute Professor Emeritus,
Front End Electronics for SOI Monolithic Pixel Sensor
Solving Rubik's Cube By: Etai Nativ.
CS284 Paper Presentation Arpad Kovacs
Summer Student Program First results
Theoretical Results on Neutrinos
Inter-system biases estimation in multi-GNSS relative positioning with GPS and Galileo Cecile Deprez and Rene Warnant University of Liege, Belgium  
Particle acceleration during the gamma-ray flares of the Crab Nebular
Interpretations of the Derivative Gottfried Wilhelm Leibniz
Advisor: Chiuyuan Chen Student: Shao-Chun Lin
Widow Rockfish Assessment
SiW-ECAL Beam Test 2015 Kick-Off meeting
Chapter 6 并发:死锁和饥饿 Operating Systems: Internals and Design Principles
You NEED your book!!! Frequency Distribution
Fairness-oriented Scheduling Support for Multicore Systems
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
The ABCD matrix for parabolic reflectors and its application to astigmatism free four-mirror cavities.
Measure Twice and Cut Once: Robust Dynamic Voltage Scaling for FPGAs
Factor Based Index of Systemic Stress (FISS)
THE BERRY PHASE OF A BOGOLIUBOV QUASIPARTICLE IN AN ABRIKOSOV VORTEX*
Quantum-classical transition in optical twin beams and experimental applications to quantum metrology Ivano Ruo-Berchera Frascati.
FW 3.4: More Circle Practice
NV centers in diamond: from quantum coherence to nanoscale MRI
פרויקט מסכם לתואר בוגר במדעים (B.Sc.) במתמטיקה שימושית
Mitchell Cox University of the Witwatersrand, Johannesburg
doc.: IEEE <doc#>
Progress on Beam Loading Studies
Topic 5: Sequences and Series
Limits on Anomalous WWγ and WWZ Couplings from DØ
Free Cooling Application for Energy Savings at Purdue
Calibration: more background
Machine learning tehniques for credit risk modeling in practice
Small-Sample Methods for Cluster-Robust Inference in School-Based Experiments James E. Pustejovsky UT Austin Educational Psychology Department Quantitative.
Introduction to Scientific Computing
Lower bounds against convex relaxations via statistical query complexity Based on: V. F., Will Perkins, Santosh Vempala. On the Complexity of Random Satisfiability.
Multidimensional Poverty Measurement
Chp9: ODE’s Numerical Solns
Gas-Electric Co-Optimization (GECO)
CMAQv5.2 and Next Generation AQ Model
Richard Anantua (UC Berkeley)
Wednesday 9/6 Welcome back!
2 INFN Sezione di Napoli, I-80126, Italy
A little math, a little physics
Conformational Sampling to Interpret SAXS Profiles
On-Shell Methods in Quantum Field Theory
Flow to Wells – 1 Steady flow to a well in a confined aquifer
Assessing Listening Ningtyas Orilina A, M.Pd.
2National Institute of Standards and Technology, Boulder, CO 80305
Introduction to Data Science Lecture 4 Stats and Featurization
Geometry Similarity and Congruency
Mathematical Formulas
Metabolism and Bioenergetics
Next Generation Carbon Nanotube Based Electronic Design
GROWTH MINDSET.
Please use speaker notes for additional information!
random number between 1 and 5.
Note the rights settings.
Programs. at the code at the site..
Wrapup which is the document write that says the end.
Arrays: Iteration Working through an array algorithmically.
Presentation transcript:

Then I use the monthArray and put the index/subscript/pointer in square bracketts to define the specific one that can be referenced by that name with that index. So May is monthArray[5] since it is the fifth month and July is monthArray[7] since it is the seventh month. Down here I want to access and print the element of the array that the current month is pointing to. If the user enters 3 as user_month then we will get monthArray[user_month] which will be monthArray[3].

This is an example of a while loop that I am going to use in my array program. Now I am addiding a new Array - I made a mistake that we will catch in a minute - I did not leave a space between new and Array. Now I have put the 4 elements in the array.

I am initializing ct at 1. Then I am doing the loop while ct is less than 5. Notice that this means I will have to change ct in the loop. The other thing I will do in the array is write the deptArray with ct as the index/subscript/pointer.

Note that I fixed the missing space. It now reads new Array. I used ct++ to increment ct. I could also use ct = ct + 1