Description
CSE1341 – Lab #1
LAB – Syntax Errors and Productivity Software [90 points]
- [10 points] Start with the program you typed and compiled. Remove the two semi-colons (;) and try to compile your program. Paste the program and the error message into a word/open office document and explain what this message means.
- Create a spreadsheet with solutions to the following four algorithm problems:
2a) [20 points] – The Fibonacci sequence is a pattern of integers starting with zero and one, where each subsequent value is equal to the sum of the prior two values:
Fn = Fn-1 + Fn-2, where F0 = 0 and F1 = 1.
Create a spreadsheet which contains the first two numbers of the Fibonacci sequence, and calculates each the next 25 values:
2b) [20 points] – World Population
The total world population was estimated at 7.6440 billion people in August 2018. Assuming an annual growth rate of 1.09% per year, create a spreadsheet showing the world population in 2018 and for each of the next 25 years. Hint: if calculated properly, the U.S. population in 2043 would be 10.0236 billion people.
2c) [20 points] – Customary unit conversion.
Create a spreadsheet that converts the following:
- Liter to gallon
- Gallon to liter
- Kilometers to miles
- Miles to kilometers
The conversion formulas:
| 1 liter | = | 0.264172 gallon |
| 1 gallon | = | 3.78541 liters |
| 1 kilometer | = | 0.621 mile |
| I mile | = | 1.609 kilometers |
Use the following sample data in your spreadsheet – for grading purpose.
2d) [20 points] – Compound Interest Calculator
The formula for annual compound interest, including principal sum, is:
A = P (1 + r/n) (nt)
Where:
A = the future value of the investment/loan, including interest
P = the principal investment amount (the initial deposit or loan amount) r = the annual interest rate (decimal)
n = the number of times that interest is compounded per year t = the number of years the money is invested or borrowed for
Assume you put $120,000 into a bank. How much will your investment be worth after 15 years at an annual interest rate of 4% compounded quarterly? How much will be the total interest earned?




