Conventions used
There are a number of text conventions used throughout this book.
Code in text:
Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and X handles. Here is an example: “Next, we have Prompt 5 as a Flask app (app.py
) with Python code.”
A block of code is set as follows:
<!DOCTYPE html> <html> <head> <title>Button Click</title> <script> function sayHello() { alert("Hello!"); } </script> </head> <body> <button onclick="sayHello()">Click me</button> </body> </html>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
import pandas as pd import matplotlib.pyplot as plt # Sample data (replace with your data) data = pd.Series([1, 2, 3, 4, 5]) # Assuming the data is in a column named "values" fig, ax = plt.subplots() ax.plot(data) ax.set_xlabel("Index") ax.set_ylabel("Value") ax.set_title("Line Plot of Data") plt.show()
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “You'd have to click the first button, Click me, to get the pop-up window again.”
Tips or important notes
Appear like this.