Sunteți pe pagina 1din 2

Midterm Exam Report

Un
TIF307– Wireless Communications
Semester Genap, 2019/2020
reg
Mohammad Dimas, Student Number May 1, 2020
Informatics, Universitas Bakrie
is t
Problem 1
ere
The following example (in Listing ??) can be used to include a snippet of code in Python in your
report. Make sure that the code is complete and running. State any non-standard configura-
tion/modules, if applicable.
d
Listing 1: Sample Python code – Fibonacci sequence calculated analytically.
1 from math import *
2
# define function
Co
3
4 def analytic_fibonacci(n):
5 sqrt_5 = sqrt(5);
6 p = (1 + sqrt_5) / 2;
q = 1/p;
py

7
8 return int( (p**n + q**n) / sqrt_5 + 0.5 )
9
10 # define range
11 for i in range(1,31):
print analytic_fibonacci(i)
of

12

You can also include a figure in your report. If you use overleaf and edit your report online,
you have to upload the figure to the overleaf file tree before you can use it. Once it is uploaded,
Ba

then you just have to use the following LATEX command. Use the command \begin{figure}
which will be auto-completed by Overleaf and then put the necessary information to point to
your figure. To reference the figure, such as Figure ??, use the LATEX command \ref{} using
Ko

the figure label as argument.


M
aT
eX

Figure 1: Use caption to briefly explained what your figure is about.


Problem 2
Un
The code given in Listing ?? is another sample to include a Bash shell code in your submission.

Listing 2: Sample Bash code.


#! /bin/bash
reg
1
2 python stage1.py
3 echo "Stage I done!"
4 python stage2.py
5 echo "Stage II done!"
python stage3.py
is t
6
7 echo "Stage III done!"
ere
d Co
py
of
Ba
Ko
M
aT
eX

S-ar putea să vă placă și