Exercises: Why Fortran?
This is a "why" chapter, so its exercises are about understanding, evidence, and argument rather than syntax — you will write your first real code in Chapter 2. Take them seriously anyway: a computational scientist who can explain why Fortran is the right tool, and when it is not, is far more valuable than one who can only type it.
Difficulty: ⭐ warm-up · ⭐⭐ standard · ⭐⭐⭐ deeper. Solutions: worked solutions to the daggered (†)
and odd-numbered problems are in appendices/answers-to-selected.md. Try every problem before you look.
Part A — Warm-ups ⭐
1.1 † In one sentence each, state the two design decisions that make Fortran fast for numerical code.
1.2 What does the name "FORTRAN" abbreviate, and in what year was the first system released?
1.3 † Explain the significance of the capitalization change from "FORTRAN" to "Fortran." Which standard marks the divide, and what changed?
1.4 Name three scientific domains in which Fortran is a dominant language today.
1.5 True or false, with one sentence of justification: "Every supercomputer in the TOP500 runs Fortran."
1.6 What is LAPACK, and why is a Python programmer who has never heard of Fortran probably running it
anyway?
Part B — The Two Fortrans ⭐⭐
1.7 † Build a timeline. For each of these standards, write one line naming its single most important addition: FORTRAN 77, Fortran 90, Fortran 2003, Fortran 2008. (You may use the chapter's timeline, but put each in your own words.)
1.8 The chapter compares the FORTRAN-77-to-modern-Fortran gap to the distance from Latin to Italian. Explain what that analogy is claiming, and give one concrete feature of modern Fortran that FORTRAN 77 lacked entirely.
1.9 † The leap from FORTRAN 77 (1978) to Fortran 90 (1991) took thirteen years. Explain how that long gap contributed to Fortran's "dead language" reputation, even though the language was very much alive afterward.
1.10 A colleague shows you code with lines that begin in column seven, use GOTO, and declare no
variables. Which era of Fortran is this, and where in this book will you learn to modernize it?
Part C — Reading the Evidence ⭐⭐
These ask you to look something up. Use fortran-lang.org, the TOP500 site, or the documentation of a
real code. Cite what you find.
1.11 † Pick one production scientific code that is written (wholly or largely) in Fortran — for example WRF, CESM, Quantum ESPRESSO, or a code from your own field. Find its public repository or homepage and report: (a) roughly how large it is (lines of code or number of source files), and (b) what scientific problem it solves.
1.12 Visit fortran-lang.org. Name three tools or resources the community currently maintains, and say
in one sentence what each is for. (This previews Chapter 16.)
1.13 † Look up the most recent TOP500 list. What operating system runs on the number-one machine, and in what language is that operating system written? Reconcile your answer with the claim that "Fortran runs the supercomputers." (This is the honesty exercise from §1.2.)
1.14 Find one job posting, in any sector, that lists Fortran as a required or desired skill. What is the role, and what other languages are listed beside it?
Part D — Make the Argument ⭐⭐
1.15 † Write a three-to-five-sentence reply to a skeptical friend who says: "Why would anyone learn a language from 1957 in 2026? Just use Python." Be persuasive and honest — concede where they have a point.
1.16 Write the opposite argument, in the same length: a case for when your friend is right and Fortran would be the wrong choice. Naming the boundary is part of expertise.
1.17 † The chapter claims "legacy code is not a burden — it is an inheritance." Argue for or against this claim using a concrete scenario: a research group has a validated 100,000-line FORTRAN 77 climate code and a summer intern who wants to rewrite it in a modern language. What should they do, and why?
Part E — Back of the Envelope ⭐⭐⭐
Order-of-magnitude estimates. Show your reasoning; exact numbers are not the point.
1.18 † A weather model updates a 3D grid of 1000 × 1000 × 100 cells, performing about 1000 floating-point operations per cell, once per simulated time step, for 100,000 time steps to produce a ten-day forecast. Estimate the total number of floating-point operations. If a single core sustains roughly $10^{10}$ operations per second, how long would the forecast take on one core? Why does this motivate the parallel programming of Part VIII?
1.19 Suppose a numerical kernel runs 50× faster in Fortran than in pure Python (a typical figure for element-by-element loops). A analysis takes 10 hours in Python. How long in Fortran? If you spend 4 hours porting it, after how many runs have you broken even?
1.20 † The chapter says a "factor of two in speed" can decide whether a result arrives this week or next month. Construct a concrete scenario where that is literally true, with rough numbers.
Part F — Find the Flaw ⭐⭐
Each statement below is wrong or misleading. Diagnose it.
1.21 † "Fortran is fast because it is a low-level language, close to the hardware like assembly."
1.22 "Modern Fortran and FORTRAN 77 are basically the same language, so if you learn one you know the other."
1.23 † "NumPy proves you never need Fortran, because NumPy is just as fast for everything."
1.24 "Fortran can't be a serious modern language because it doesn't have objects, modules, or dynamic memory."
Part G — Get Ready to Build ⭐
1.25 † Complete the Chapter 1 Project Checkpoint: create a folder heat-solver/, and inside it a
README.md containing two or three sentences describing, in plain language, the problem your simulation
will solve. Paste your README text as your answer.
1.26 Which of the four reading tracks (🔬 Scientist, 📖 Standard, 🔧 Legacy, ⚡ HPC) best matches your goals, and why? Which parts will you prioritize?
1.27 † Before Chapter 2, check whether you already have a Fortran compiler: open a terminal and run
gfortran --version. Report what happens. (If you get a version number, you are ahead; if you get "command
not found," Chapter 2 will fix that.)
1.28 Write down your one-sentence answer to "why learn Fortran?" and seal it (a dated note, a commit message, anywhere you will find it later). You will compare it to your Chapter 40 self.
Coding begins next chapter. Solutions to the daggered and odd-numbered problems are in
appendices/answers-to-selected.md; the setup and provenance exercises (1.11–1.14, 1.25, 1.27) have
answers that depend on when and where you look, so the appendix gives a model response rather than a single
correct one.