Wednesday, October 16, 2019

Junior 2 ICA -For Loops

The robotic team has built a robot that collects pollutants and takes them to a collector bin.  The bin holds 1000 pieces of trash.  The human worker separates the trash into two categories:  Recycle and Reuse.  Write a program that calculates and states the amount of pieces of pollutants for recycle and the amount for reuse.

Post your solution as a comment.

Tuesday, October 15, 2019

Solution to Algorithm 2 Test #2

'the student council is selling tickets to the dance as follows'
'Junior Dance - $5.00'
'Senior Dance - At door - $15.00  - Advance -$10.00'
'students need an ID for Senior Dance'
'Determine and output the total for a student purchasing ticket(s)'

'This algorithm is written as the solution for algorithm #2 on Test 2'

jd = 5      'jd represents junior dance fee'
sda = 10  'sda represents senior dance fee advanced purchase'
sdd = 15  'sdd represents senior dance fee at the door'

print "Enter 1 for Junior dance ticket purchase"
print "Enter 2 for Senior dance ticekt purchase"
print "Enter 3 for combination purchases"
input num

if (num = 1) then
   print "enter the number of junior tickets needed"
   input jnum
   total = jnum * jd
   print "Your total is $", total
end if

if (num = 2) then
   print "Enter 1 for advanced purchase or 2 for tickets to pay for at the door"
   input ans
   if (ans = 1) then
      print "enter the number of senior tickets needed"
      input snum
      total = snum * sda
      print "Your total is $", total
  else
      if (ans = 2) then
         print "enter the number of senior tickets you want to reserve"
         input snum2
         total = snum2 * sdd
         print "We are reserving your tickets and you may pick up at the door upon payment."
         print "Your total will be $", total
      end if
   end if
end if

if (num = 3 ) then
   print "enter the number of junior tickets needed"
   input jnum
   jtotal = jnum * jd
 
   print "Enter 1 for advanced purchase or 2 for tickets to pay for at the door"
   input ans
   if (ans = 1) then
      print "enter the number of senior tickets needed"
      input snum
      stotal = snum * sda
   else
      if (ans = 2) then
         print "enter the number of senior tickets you want to reserve"
         input snum2
         sdtotal = snum2 * sdd
         print "We are reserving your tickets and you may pick up at the door upon payment."
      end if
   end if
   total = jtotal + stotal + sdtotal
   total2 = jtotal + stotal
   print "Your overalltotal is $", total
   print total2 , " is due now and ", sdtotal,"is due at the door"
end if

Print "Thank you for supporting the Student Council"
input key
 

Monday, October 7, 2019

Test Outline Updated

Junior 1 Test 2 - Theory - Day 9
Junior 2 Test 2 - Theory -  Day 8

Due to an unexpected change in schedule for Day 9, the test will be a Short Test, meaning that it is timed for 40 minutes or less.

The outline is updated as follows:

Part 1 - Multiple Choice (5 points)
5 questions

Part 2 - Structured Questions (45 points)
1 theory question based on control structures (5 points)
2 conditional algorithms (20 points each)