To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
The topics of searching (finding certain values in a collection of values) and sorting (putting values into an order) are not new to us. As we have examined various scientific and engineering computing use cases, we have encountered both topics. For searching, we have seen the use of if statements, boolean expressions, etc. For sorting, we have seen the use of the sorted function.
Fundamental to food security is irrigated agriculture. This chapter discusses different aspects that impact food security, including population, agricultural land, water availability, water quality, crop water requirement, energy requirement, food production, increase in food production due to irrigated agriculture, and impacts of climate change.
If you have read the preceding chapters of this book, you know more about the field of behavior genetics than the average person on the street. But you may be wondering if the body of behavior genetic knowledge has any applications in real life. To be sure, most research in behavior genetics is basic research. In other words, the research is focused on better describing, predicting, and explaining heredity–behavior relations. It is not typically applied research where the focus is on solving practical problems, such as changing behavior.
In Section 4.2.4 we introduced code comments and Jupyter markdown, and in Section 6.2.6, we introduced docstrings. Although these constructs and practices are vital for the programs we write, there is more to documentation. Documentation is often unsung, but it plays a vital role in making our programs understandable and usable by ourselves and others. Python has a number of tools to streamline the process of creating documentation. In this chapter, we discuss principles of documenting, a more detailed general convention for docstrings than was described in Section 6.2.6, and the Sphinx documentation-generation program.
One way of thinking of what a programming language does is that it provides various structures to store data and information (e.g., variables, lists, arrays, object attributes) and various structures to execute tasks (e.g., assignment, branching, looping, functions, object methods). A program, then, is some combination of these structures that accomplish the calculation, visualization, or other task the user is interested in conducting.
Have you ever tried to lose weight? Many of us would like to weigh less than we do. On the other hand, some people struggle to gain weight. The topic of weight control is a stark reminder of the complex interplay between biology, psychology, and environment that has major implications for well-being. We may intend to change our weight by altering our behavior, but someone brings donuts, and we feel too tired to exercise after a long day of sitting at a desk. For many of us, it is all too easy to gain weight, and as we age it becomes increasingly difficult to lose it.
Evapotranspiration (ET) is either estimated for a reference crop, such as alfalfa or grass, or as a potential ET value. The estimated ET value is then modified for a specific crop using a crop coefficient, which is what constitutes the crop water use or consumptive use. Estimation of the crop coefficient is therefore fundamental. The objective of this chapter is to discuss the methods for converting the estimated ET to a specific crop ET, which is the same as crop water use, or to compute the crop coefficient.
Imagine that you are about to give a presentation in front of an auditorium full of people. As you walk to the podium, what physical sensations do you feel? Is your heart pounding? Are your palms sweaty? Do you feel a bit nauseous? What are you thinking about? Are you concerned that you might forget what you are planning to say, or that people will evaluate you negatively? Although it is very common to have such feelings and thoughts at the prospect of speaking in public, there are individual differences such that some people experience few if any negative feelings and thoughts, while others may experience so many that they find it difficult to speak even to a few people. Most of us are somewhere in between (Figure 10.1).
In the , we saw how to make a basic line and scatter plot. As useful as the default values are in Matplotlib, we often want to make our plots look different. In this chapter, we describe some of the ways of doing so. We also introduce more features of Python that enable us to do this customization.
Have you experienced any emotions today? Of course, you have. Perhaps you were irritated when your alarm woke you from a peaceful slumber thereby reminding you to go to class this morning. Maybe your roommate had already made the coffee, which cheered you up slightly. Such feelings are an integral part of human experience. When your emotions are functioning appropriately, they can help you navigate life by giving you a way to assess how the current situation aligns with your goals and to help prepare you to face new challenges. When your emotions are not functioning properly, you may find it difficult to deal with stressful situations, which may lead to social or occupational problems over time.
You probably learned a lot more about individual differences in grade school than you realize. Grade school was the first place where many of us regularly interacted with a relatively large number of human beings. You were able to observe a rich diversity of individual differences, although you probably were not thinking about it in such terms, at the time. Children of the same age can differ in physical traits, such as height, weight, eye color, hair color, and skin color. They can also differ in behavior traits such as coordination, running speed, strength, and stamina. Children can also differ on psychological traits such as anxiety, aggression, extraversion, and impulsivity. Of course, you also probably noticed that grade school students can differ on their success in the classroom.
Soil water occurs in the unsaturated zone and is the only source of water and nutrients for most agricultural crops. Since nutrients, including fertilizers, are dissolved in soil water, it is the only source from which plants can extract them. The objective of irrigation is to maintain enough soil water in the soil. This chapter discusses some rudimentary aspects of this water.
Line and scatter plots, which we described in Chapters 4 and 5, are the bread and butter of scientific visualization. There are, however, many other kinds of graphs used to display and analyze scientific and engineering information. In this chapter, we examine two such kinds of visualization: contour plots and animations of two-dimensional plots and images. Contour plots are a common way of presenting data whose values change based on the location in two-dimensional space.