---
jupytext:
    formats: md:myst
    text_representation:
        extension: .md
        format_name: myst
kernelspec:
    display_name: Python 3 (ipykernel)
    language: python
    name: python3
---


# Bending of beams: deformation; Application of standard deflection formulas

**Book: Introduction Chapter 6, Sections 6.1 and 6.2 (excluding Subsections 6.2.2 and 6.2.4), Section 6.3 and a replacement for Section 6.4**

Consider the displacement of the neutral surface in $y$-direction and rotation of the cross-section of the beam as a function of $x$, as depicted in {numref}`L9-fig1`. For statically indeterminate beams, the displacements and rotations are needed for computing the internal forces and moments in the beam. The shear deformation, as depicted in Figure 6.1c, will be neglected. This is allowed for slender beams (see below).

```{figure-md} L9-fig1
<img src="Media/L9_Media/L9-fig1.svg" width="600px">

Cantilever deflection: bending yields curved profile; shear yields linear slope. Set criteria of $\displaystyle v_s \ll v_b$. 
```

From a previous chapter, we know that: 

$$ \frac{1}{R} = \frac{M}{EI} $$ (eq1-L9)

The product $EI$ is called the **bending stiffness**. The lateral displacement of the neutral surface of the beam is denoted by $v$, which is a function of $x$. It is assumed that the strains parallel to the cross-section are negligible and that, as an approximation, we can assume that the lateral displacement is the same for all points in the cross-section.

```{figure-md} L9-fig2
<img src="Media/L9_Media/L9-fig2.svg" width="550px">

Relation between radius of curvature and lateral displacement $\nu$.
```

Considering {numref}`L9-fig2` above, we see that

$$ \displaystyle d\theta =
\frac{\text{length of the arc }\text{A}'\text{B}'}{R(x)} \approx
 \frac{dx}{R(x)} $$ (eq2-L9)

but also since the angles are small 

$$ d\theta \approx \left(
\frac{dv}{dx} \right)_{x+dx} - \left(
\frac{dv}{dx} \right)_{x} $$  (eq3-L9)

which leads to (after equating the two expressions for $d\theta$):

$$ \frac{1}{R(x)} \approx \frac{\left( \dfrac{{d}v}{{d}x}
\right)_{x+dx} - \left( \dfrac{{d}v}{{d}x}
\right)_{x}}{dx} $$  (eq4-L9)

Taking the limit $dx\rightarrow0$, we obtain for small lateral displacement $v$ approximately:

$$ \frac{1}{R(x)} = \frac{d^2v}{{d}x^2} $$  (eq5-L9)

Substituting this result into the first equations of this chapter gives the important differential equation:

$$ EI(x) \frac{{d}^2 v}{{d}x^2} = M(x) \quad \text{or}
\quad EI \frac{{d}^2 v}{{d}x^2} = M(x) \text{ for constant }I $$  (eq6-L9)

Note, that the positive direction of $M$ should be defined as in {numref}`L6-fig13-14`.

Because  $ {d}M/{{d}x} = V(x) $ and $ {d}V/{d}x = - q(x) $, we find for constant $I$:

$$ \displaystyle EI \frac{{d}^3 v}{{d}x^3} = V(x)
\quad \text{and} \quad \displaystyle EI \frac{{d}^4 v}{{d}x^4} = -q(x). $$  (eq7-L9)

Integration of one of these three differential equations and taking the correct boundary conditions into account, will lead to a solution for the lateral displacement $v(x)$. The first one is the most easy to use, especially for statically determinate beams. An example for pure bending is given in [Example 9.1](#example-L9-1).



<a name="example-L9-1"></a>
`````{admonition} Pure bending
:class: examp dropdown

```{figure-md} L9-fig3
<img src="Media/L9_Media/L9-fig3.svg" width="550px">

Simply supported beam with equal end moments, constant bending moment.
```
The system described in {numref}`L9-fig3` has a prismatic beam of total length $L$, simply supported at points $A$ and $B$ by idealized pinned supports.  At each end an equal concentrated moment of magnitude $M_{0}$ is applied, as shown by the curved arrows at $A$ and $B$.  A right‐pointing arrow along the beam denotes the positive $x$–axis, with the coordinate $x$ measured from the left support at $A$ toward the right support at $B$.  The complete loading and support arrangement appear as illustrated. What is the displacement as a function of x along the beam?


````{admonition} Solution
:class: sol dropdown

```{figure-md} L9-fig4
<img src="Media/L9_Media/L9-fig4.svg" width="550px">

Shear force and bending moment diagrams for the simply supported beam under equal end–moments $(M_{0})$.

```
The upper plot in {numref}`L9-fig4` shows the shear force $(V(x))$, which remains exactly zero throughout the span.  This reflects the absence of any transverse (vertical) loads on the beam, so there is no change in internal shear from one end to the other.  The lower plot in {numref}`L9-fig4` shows the bending moment $(M(x))$, which is a flat line at the level $(M_{0})$ between the supports.  This indicates a state of pure bending: the internal moment is uniform and equal to the applied end moments for all $(0<x<L)$, dropping abruptly to zero only at the supports where the beam is free to rotate.  

From the moment diagram we find that $ \displaystyle M(x) = M_0 $. With $\displaystyle M(x) = EI \frac{d^2\upsilon}{dx^2}$ we then find that

$$
EI \frac{d^2\upsilon}{dx^2} = M_0
$$

Now with integration we find

$$
\begin{align*}
EI \frac{d\upsilon}{dx}&= M_0x+A,\\
EI \upsilon &= \frac{1}{2}M_0x^2 +Ax+B.    
\end{align*}
$$

where $A$ and $B$ and constants of integrations that need to be found. This is done by using the boundary conditions $\displaystyle \upsilon(0)= 0, \ \ \ \upsilon(L) = 0$. Thus $\displaystyle \implies B = 0$ and $\displaystyle A = -\frac{1}{2}M_0L$. With thus

$$
\begin{align*}
\upsilon(x) = \frac{M_0}{2EI}x\left(x-L\right),\\
\frac{d\upsilon}{dx}(x) = \frac{M_0}{EI}\left(x-\frac{1}{2}L\right).
\end{align*}
$$



```{figure-md} L9-fig5
<img src="Media/L9_Media/L9-fig5.svg" width="550px">

Deflection diagram for beam under pure end–moments $M_{0}$.

```
```{figure-md} L9-fig6
<img src="Media/L9_Media/L9-fig6.svg" width="550px">

Rotation diagram for beam under pure end–moments $M_{0}$.
```


For the angles and finding $v_{\min}$ we make a deflection and rotation diagram as shown in {numref}`L9-fig5` and {numref}`L9-fig6`. The upper sketch {numref}`L9-fig5` shows the transverse deflected shape $v(x)$ of the beam, which sags symmetrically under the constant bending moment. The maximum downward deflection occurs at midspan, where

$$
v_{\min} = -\frac{M_{0}L^{2}}{8EI},
$$

and tangent lines at the ends illustrate the end-rotations $\theta(0)$ and $\theta(L)$.

The lower plot {numref}`L9-fig6` is the slope diagram, plotting

$$
\theta(x) = \frac{dv}{dx}
$$

against $x$. It varies linearly from

$$
\theta(0) = -\frac{M_{0}L}{2EI}
$$

at the left support, through zero at mid-span, to

$$
\theta(L) = +\frac{M_{0}L}{2EI}
$$

at the right support, reflecting the uniform bending moment throughout the span. We can finally do a units check:

$$
\rm \frac{Nm \ m^2}{\frac{N}{m^2}m^4} = m.
$$


````

`````


<a name="example-L9-2"></a>
`````{admonition} Concentrated force
:class: examp dropdown


```{figure-md} L9-fig7
<img src="Media/L9_Media/L9-fig7.svg" width="550px">

prismatic beam cantilevered from a rigid vertical support.
```



Consider a homogeneous prismatic beam shown in {numref}`L9-fig7` of length $L$ cantilevered from a rigid vertical support at its left end.  A Cartesian coordinate system is shown with the $x$–axis directed along the beam from the wall toward the free tip and the $y$–axis vertical and upward at the support.  At the free end ($x=L$) a concentrated transverse load $F$ acts downward.  The support condition, coordinate axes, beam geometry, and end‐load are illustrated as shown. What is the displacement as a function of x along the beam?


````{admonition} Solution
:class: sol dropdown

```{figure-md} L9-fig8
<img src="Media/L9_Media/L9-fig8.svg" width="550px">

Shear force and bending moment diagrams for the cantilevered prismatic beam.
```
From the Moment diagram in {numref}`L9-fig8` we find that $\displaystyle M(x) = -F(L-x)$, with $\displaystyle M(x) = EI \frac{d^2\upsilon}{dx^2}$ thus 

$$
EI \frac{d^2\upsilon}{dx^2} = - F(L-x) = Fx - FL.
$$

Integrating twice gives

$$
\begin{align*}
    EI \frac{d\upsilon}{dx} &= \frac{1}{2}Fx^2-FLx + A,\\
    EI \upsilon &= \frac{1}{6}Fx^3-\frac{1}{2}FLx^2 + Ax+B.
\end{align*}
$$

where $A$ and $B$ are integration constants that we find by invoking the boundary conditions  $\displaystyle \frac{d\upsilon}{dx}(0)= 0 , \ \ \ \upsilon(0)= 0$. From here it thus is found that $\displaystyle \implies A= B = 0$. We can now write

$$
\begin{align*}
    \upsilon(x) &= \frac{F}{6EI}\left(x^3-3Lx^2\right),\\
    \frac{d\upsilon}{dx}(x) &= \frac{F}{2EI}\left(x^2-2Lx\right).
\end{align*}
$$

```{figure-md} L9-fig9
<img src="Media/L9_Media/L9-fig9.svg" width="550px">

$\upsilon$ and $\frac{d\upsilon}{dx}$ plotted with respect to $x$ for the cantilevered prismatic beam.
```

On the right side the deflection curve we have

$$
\upsilon(L) = -\frac{FL^3}{3EI}
$$

which is the vertical displacement (downward deflection) of the free end at $x=L$ under the tip load $F$. On the right of the slope curve we have

$$
\frac{dv}{dx}\Big|_{x=L} \;=\; -\frac{F\,L^2}{2\,E\,I},
$$

which is the rotation (slope) of the beam’s neutral axis at the free tip due to the same load. 



`````










In [Example 9.2](#example-L9-2) two standard formulas are derived: the displacement and slope at the end of a **cantilever beam of length $L$ with a concentrated force $F$ applied at the free end** (see Figure 6.6):

$$ \displaystyle \left( \frac{{d}v}{{d}x} \right)_{x=L}
= - \frac{FL^2}{2EI}, \quad v(L) = - \frac{FL^3}{3EI} $$  (eq8-L9)

An approximation of the shear displacement $v_\text{s}$ of a cantilever beam with concentrated force can be obtained as follows. First, assume a constant shear stress distribution on a rectangular cross-section  of width $b$ and height $d$, i.e. $\tau=F/{bd}$. The shear displacement now becomes approximately (see Figure 6.1c):

$$ v_\text{s} = \gamma L = \frac{FL}{Gbd} $$  (eq9-L9)

The bending displacement for this case is given by

$$ v_\text{b} = \frac{FL^3}{3EI} = \frac{4FL^3}{Ebd^3} $$  (eq10-L9)

Assuming $\nu=0$, the ratio of shear displacement to bending displacement is 

$$ \frac{v_\text{s}}{v_\text{b}} =
\frac{Ed^2}{4GL^2} \approx \frac{1}{2} \left( \frac{d}{L} \right)^2 $$  (eq11-L9)

which is very small for slender beams ($d\ll L$) and the shear deformation can be neglected in that case. The conclusion remains the same for other values of the Poisson ratio.





<a name="example-L9-3"></a>
`````{admonition} Distributed load
:class: examp dropdown


```{figure-md} L9-fig10
<img src="Media/L9_Media/L9-fig10.svg" width="550px">

Cantilever beam fixed at the left wall, length $L$, with the $x$-axis running along the beam and the $y$-axis upward. A uniform downward distributed load $q_0$ acts over the entire span, and the right end is free-illustrating the setup for finding the transverse displacement.
```

A straight, prismatic cantilever beam $AB$ of length $L$ as depicted in {numref}`L9-fig10` is rigidly fixed at the wall at $x=0$ and free at the tip $x= L$. The beam has constant flexural rigidity $EI$ and is loaded along its entire span by a uniform downward distributed load of intensity $q_0$ (force per unit length).

What is the displacement as a function of $x$ along the beam?

````{admonition} Solution
:class: sol dropdown


```{figure-md} L9-fig11
<img src="Media/L9_Media/L9-fig11.svg" width="550px">

Cantilever beam of length $(L)$ fixed at $(A)$ and free at $(B)$, subjected to a constant distributed load $(q_{0})$.  The resulting internal actions are (middle) a linear shear‐force diagram $(V(x)=q_{0}\bigl(L-x\bigr))$ and (bottom) a quadratic bending‐moment diagram $(M(x)=-\dfrac{q_{0}}{2}\bigl(L-x\bigr)^{2})$.

```

Cut the beam at a section $(x)$ from the fixed end. By equilibrium of the free‐body to the right of the cut,

$$
V(x) - q_0\,(L - x) = 0
\quad\Longrightarrow\quad
\boxed{V(x) = q_0\,(L - x)\,.}
$$

Taking moments about the cut gives us

$$
M(x) + q_0\,(L-x)\times\frac{L-x}{2} = 0
\quad\Longrightarrow\quad
\boxed{M(x) = -\frac{q_0}{2}\,(L - x)^2\,.}
$$

The elastic curve satisfies

$$
EI\,\frac{d^2v}{dx^2} = M(x)
= -\frac{q_0}{2}(L-x)^2.
$$

Integrate once to get the slope $(v'(x))$:

$$
EI\,v'(x)
= \int -\frac{q_0}{2}(L-x)^2 \,dx
= -\frac{q_0}{2}\,\left[-\tfrac{(L-x)^3}{3}\right] + C_1
= \frac{q_0}{6}(L-x)^3 + C_1.
$$

Apply the boundary condition at the fixed end, $(v'(0)=0)$

$$
0 = \frac{q_0}{6}L^3 + C_1
\quad\Longrightarrow\quad
C_1 = -\frac{q_0\,L^3}{6}.
$$

Hence

$$
\boxed{v'(x)
= \frac{q_0}{6EI}\bigl[(L-x)^3 - L^3\bigr].}
$$

Integrate again to get $(v(x))$:

$$
EI\,v(x)
= \int \bigl[\tfrac{q_0}{6}(L-x)^3 - \tfrac{q_0\,L^3}{6}\bigr]\,dx + C_2.
$$

Compute the integral:

$$
\int (L-x)^3\,dx = -\frac{(L-x)^4}{4}, 
\quad
\int L^3\,dx = L^3 x,
$$

so

$$
EI\,v(x)
= \frac{q_0}{6}\Bigl[-\tfrac{(L-x)^4}{4}\Bigr]
- \frac{q_0\,L^3}{6}\,x + C_2
= -\frac{q_0}{24}(L-x)^4 - \frac{q_0\,L^3}{6}\,x + C_2.
$$

Apply the boundary condition $(v(0)=0)$:

$$
0 = -\frac{q_0}{24}L^4 - 0 + C_2
\quad\Longrightarrow\quad
C_2 = \frac{q_0\,L^4}{24}.
$$

Thus

$$
\boxed{v(x)
= -\frac{q_0}{24EI}\Bigl[(L-x)^4 - L^4\Bigr]
- \frac{q_0\,L^3}{6EI}\,x.}
$$

One may expand and simplify:

$$
v(x)
= -\frac{q_0}{24EI}\,\bigl(x^4 - 4L\,x^3 + 6L^2\,x^2\bigr).
$$

At the free tip $(x=L)$,

$$
v(L)
= -\frac{q_0}{24EI}\,(L^4 -4L^4 +6L^4)
= -\frac{q_0\,L^4}{8EI},
$$

and

$$
v'(L)
= \frac{q_0}{6EI}\bigl[(0)^3 - L^3\bigr]
= -\frac{q_0\,L^3}{6EI}.
$$

If one replaces the uniform load by an equivalent concentrated force
$(\;F = q_0 L)$ acting at the tip, the elementary cantilever tip‐deflection would be
$(\;v_{\rm eq} = \tfrac{F L^3}{3EI})$.
Comparing,

$$
v(L) = -\frac{3}{8}\,\Bigl(\frac{F\,L^3}{3EI}\Bigr)
= -\frac{F\,L^3}{8EI},
$$

which correctly recovers our uniformly‐distributed result when $(F=q_0L)$.


````


`````


In [Example 9.3](#example-L9-3) again two standard formulas are derived: the displacement and slope at the end of a **cantilever beam of length $L$ with a uniform distributed force $q_0$**:

$$ \displaystyle \left( \frac{{d}v}{{d}x} \right)_{x=L} =
- \frac{q_0L^3}{6EI}, \quad v(L) = - \frac{q_0L^4}{8EI} $$  (eq12-L9)

Assignment: derive the two standard formulas for the displacement and slope at the
end of **cantilever beam of length $L$ with a concentrated moment $M$ applied at the free end**:

$$ \displaystyle \left( \frac{{d}v}{{d}x} \right)_{x=L}
= \frac{M L}{EI}, \quad v(L) = \frac{M L^2}{2EI} $$  (eq13-L9)

In appendix C several formulas for displacements and slopes for common cases have been tabulated. Also see the Examples 6.4 and 6.5 for a general approach in deriving these formulas.

In Section 6.2.2 it is explained that discontinuities in the shear force and bending moment requires much more effort in finding analytical solutions for the differential equations. The reason is that the regions separated by the discontinuities have different integration constants that need be determined by matching the solutions at the discontinuities. In order to handle these solutions more easily, so-called singularity functions or step functions are introduced.
Since we can deal with these complicated cases using a numerical program, such as Marc/Mentat, **the step function approach (Section 6.2.2) will not be part of the exam**. Moreover, by cleverly using the examples from Appendix C together with superposition, fictitious fixed ends, symmetry conditions and rigid rotation deflection (Dutch: `kwispeleffect') we can solve beam deflection problems in an alternative way without using the step function approach.
 

```{figure-md} L9-fig12
<img src="Media/L9_Media/L9-fig12.svg" width="550px">

Cantilever beam of total length $(L)$, fixed at the left end, with a concentrated load of magnitude 5 $W$ applied at its midpoint $((x=L/2))$. The load causes a downward deflection $(\delta)$ at the point of application and a rotation by angle $(\theta)$; the remaining half‐length then produces an additional vertical displacement of $(\theta,L/2)$ at the free tip.
```


If the material behaviour is linear elastic the load can be split into partial loads and the displacements and rotations can be determined by *superposition* of the results of the partial loads. Examples 6.9 and 6.10 show this procedure. Example 6.10 also shows the application of rigid rotation deflection (Dutch: “kwispeleffect”). For the end displacement of the partial load of the concentrated force (see {numref}'L9-fig12'), we get

$$ \displaystyle v = \delta + \theta \frac{L}{2} = - \frac{5W \left( \dfrac{L}{2} \right)^3}{3EI} - \frac{5W \left( \dfrac{L}{2}
\right)^2}{2EI} \frac{L}{2} $$ (eq14-L9)

The second term is the result of rigid rotation deflection. The solution of this example after superposition of all partial loads (concentrated force and distributed load) is:

$$ \displaystyle v =  - \frac{5W \left( \dfrac{L}{2} \right)^3}{3EI}
- \frac{5W \left( \dfrac{L}{2} \right)^2}{2EI} \frac{L}{2}  - \frac{
\dfrac{W}{L} L^4}{8EI} = - \frac{31}{48} \frac{WL^3}{EI} $$ (eq15-L9)

Check that the result has the correct dimension of length.

**Check the dimension of all (partial) results of deflections and slopes!**

**Section 6.2.4 on beams of varying cross-section is not part of the exam.** However, realise that if the cross-section depends on the axial coordinate $x$, and thus $I = I(x)$, the curvature-moment relation becomes more difficult (see Eq. (6.52)). As a result, the integration process of obtaining the deflection $v(x)$ is more difficult as well. This is shown in Example 6.11.

For simply supported beams it is often possible to use a *fictitious fixed end*, if we know where the slope is zero. For example for symmetric beams with a symmetric loading the fictitious fixed end can be assumed half way. Now we can apply the standard case of Appendix C for a cantilever to half of the beam using the reaction force and the applied loads to half of the beam. **Don't forget to substitute half the length of the beam in the deflection formulas!** Apply this procedure to Example 6.9 and compare with the result in the book.


```{figure-md} L9-fig13
<img src="Media/L9_Media/L9-fig13.svg" width="350px">

Translational spring model: a rigid block undergoes a linear displacement $v$ against a spring of stiffness $k$ with $F = k\,v$.
```

```{figure-md} L9-fig14
<img src="Media/L9_Media/L9-fig14.svg" width="350px">

Rotational spring model: a shaft embedded in a housing deflects by a small angle $\theta=\dfrac{dv}{dx}$ under rotational stiffness $\lambda$ with $M = \lambda\,\theta \;=\; \lambda\,\frac{dv}{dx}$.
```


## Deflection of statically indeterminate beams

All examples in Section 6.3 can be solved using the principal of superposition instead of the unnecessary complicated step function approach. For more complicated loading conditions we resort to numerical software.

If the number of reaction forces is greater than three, equilibrium alone is not sufficient to determine the forces. In that case, we call the beam to be *statically indeterminate*. In order for the forces to be determined we need the material behaviour as well.

In Section 6.3 flexible supports are considered. The reaction force in such support is proportional to the deflection or rotation at the support. The ratio of reaction force $F$ and deflection $v$ is called the *stiffness* $k$ of the support: $F=kv$. Note, that $k$ is a *positive* constant and the directions of $F$ and $v$ should reflect that. Similarly, the ratio of reaction moment $M$ and rotation of the support $\theta$ is called the *rotational stiffness* $\lambda$ of the support: $M=\lambda\theta$ (see Figures {numref}`L9-fig13` and {numref}`L9-fig14`). Again, the rotational stiffness $\lambda$ is a positive constant.

Solving statically indeterminate beams is not very different from statically determinate beams.
First, it is determined which supports are redundant, i.e. not needed to support the beam as a statically determinate one. These supports are replaced by unknown (reaction-) forces and/or moments. Next, the deflections and rotations are computed as a function of the unknown forces and/or moments. Finally, these forces and/or moments are computed by the boundary conditions imposed by the redundant supports. Generally, redundant supports will increase the stiffness of the beam structure.

Examples 6.12 and 6.13 use the step function approach. Instead, these examples should be solved using the standard deflection formulas of Appendix C and the principle of superposition. 
Try to do this as an exercise and compare the results with the results in the book. In the lectures more details on solving Examples 6.12 and 6.13 will be given.

**Section 6.4 will not be part of the exam.** It is replaced by the text below.

Except for a single beam with a simple load, solving more complicated beam structures is a lot of work and doing this by hand is almost impossible. Therefore a systematic and automated computer method is needed: *the finite element method*. The method doesn't distinguish statically determinate and indeterminate structures, because the displacements instead of forces are the primary unknowns. Computing forces is a post-processing step.
 
The finite element method consists of several steps. The first step is a division of the beam structure into small pieces (elements). The elements are connected to each other in the nodes. In these nodes the displacement degrees of freedom (three translations and three rotations for a beam) are defined. The second step is cutting each element from the beam structure at the nodes and introducing forces/moments that act on the element. For standard beam elements the two ends of a straight beam define the nodes. In these nodes the corresponding forces/moments that act on the beam are defined. The third step is computing the stiffness of single elements, i.e. the relation between the displacement degrees and forces/moments on an element. For this step the standard formulas of Appendix C could be used. The fourth step is that equilibrium of forces and moments in the nodes is applied and the relations obtained in the third step are substituted. In that way a system of linear equation for the displacements in the nodes is obtained. After taking the specified forces and displacements into account, this system can be solved. The last step is the post-processing step, in which the forces, moments, bending stresses and strains can be computed from the displacements in the nodes.

The computer program based on the finite element method which we use in this course is Marc/Mentat. Try to solve the Example 6.16 using Marc/Mentat and compare with the results in the book.



## Quiz
### Question 1

```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q1.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```

### Question 2

```{figure-md} L9-figQ2.1
<img src="Media/Quizzes/L9_quiz/quiz2.1.png" width="400px">

Figure for question below.
```

```{figure-md} L9-figQ2.2
<img src="Media/Quizzes/L9_quiz/quiz2.2.png" width="600px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q2.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
### Question 3

```{figure-md} L9-figQ3
<img src="Media/Quizzes/L9_quiz/quiz3.png" width="500px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q3.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```


### Question 4

```{figure-md} L9-figQ4
<img src="Media/Quizzes/L9_quiz/quiz4.png" width="400px">

Figure for question below.
```

```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q4.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```

### Question 5


```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q5.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```

### Question 6

```{figure-md} L9-figQ6
<img src="Media/Quizzes/L9_quiz/quiz6.png" width="600px">

Figure for question below.
```


```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q6.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```

### Question 7

```{figure-md} L9-figQ7
<img src="Media/Quizzes/L9_quiz/quiz7.png" width="600px">

Figure for question below.
```


```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q7.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```


### Question 8

```{figure-md} L9-figQ8
<img src="Media/Quizzes/L9_quiz/quiz8.PNG" width="600px">

Figure for question below.
```


```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q8.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```

### Question 9

```{figure-md} L9-figQ9
<img src="Media/Quizzes/L9_quiz/quiz9.png" width="600px">

Figure for question below.
```


```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q9.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```


### Question 10

```{figure-md} L9-figQ10
<img src="Media/Quizzes/L9_quiz/quiz10.png" width="600px">

Figure for question below.
```


```{code-cell} ipython3
:tags: ["remove-input"]

import json
from jupyterquiz import display_quiz

with open("Quizzes/L9_quizzes/q10.json", "r", encoding="utf-8") as f:
    questions = json.load(f)

display_quiz(questions, shuffle_answers=True)
```
