BookmarkSubscribeRSS Feed
genius99
Calcite | Level 5

I have been given this task below can someone help me understand what I have to do?

 

You are considering taking out a loan that requires monthly payments. The loan is $10000 and has simple interest of 0.25% per month.  Your payment is $100 per month.  Create data steps that will calculate the following:

  1. Your loan balance after 10 payments.
  2. The number of payments you’ll need to make until the loan is paid off.
  3. The number of payments you’ll need to make if you increase the payment to $125 every other month (starting with 2nd month).

For each, show for each month, the starting loan balance for the payment, the interest charge (calculated before the payment), the payment amount, and the ending balance.

 

I have loaded all the data sets

/* Load Orders Data */
data work.orders;
  infile "C:/Users/100355202/Desktop/Orders(3).txt" dsd dlm="09"x firstobs=2;
  input OrderID CustomerID $ EmployeeID 
        OrderDate :mmddyy10. RequiredDate :mmddyy10. ShippedDate :mmddyy10.
        ShipVia Freight ShipName :$100. ShipAddress :$100. ShipCity :$100. ShipRegion :$100. 
        ShipPostalCode :$100. ShipCountry :$100.;
  format OrderDate mmddyy10. RequiredDate mmddyy10. ShippedDate mmddyy10.;
run;

/*Load Order Details data */
data work.orderdetails;
  infile "C:/Users/100355202/Desktop/OrderDetails(1).txt" dsd dlm="09"x firstobs=2;
  input OrderID ProductID UnitPrice Quantity Discount;
run;

 

2 REPLIES 2
Astounding
PROC Star

Just to get you moving ...

 

It's good that you know how to load your data sets.  But those data sets are not related to the questions you have to solve.

 

Here's a beginning:

 

data test;
   balance = 10000;
   balance = balance * 1.0025 - 100;
run;

This math computes the remaining balance after 1 month.  Now it's up to you to figure out how to extend the logic for multiple months.

genius99
Calcite | Level 5

does this calculate the Balance after 10 payments?

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1216 views
  • 0 likes
  • 2 in conversation