Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

difference-of-squares: renamed square_of_sums to square_of_sum #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions exercises/difference-of-squares/example.plsql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
create or replace package series#
is
function square_of_sums (
function square_of_sum (
i_num pls_integer
) return number;
function sum_of_squares (
Expand All @@ -14,13 +14,13 @@ end series#;

create or replace package body series#
is
function square_of_sums (
function square_of_sum (
i_num pls_integer
) return number
is
begin
return power(i_num * (i_num + 1) / 2, 2);
end square_of_sums;
end square_of_sum;
function sum_of_squares (
i_num pls_integer
) return number
Expand Down
12 changes: 6 additions & 6 deletions exercises/difference-of-squares/ut_series#.plsql
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ is
procedure run
is
begin
test(i_descn => 'test_square_of_sums_to_5' , i_exp => 225 , i_act => series#.square_of_sums(5) );
test(i_descn => 'test_square_of_sum_to_5' , i_exp => 225 , i_act => series#.square_of_sum(5) );
test(i_descn => 'test_sum_of_squares_to_5' , i_exp => 55 , i_act => series#.sum_of_squares(5) );
test(i_descn => 'test_difference_of_sums_to_5' , i_exp => 170 , i_act => series#.diff_of_squares(5) );
test(i_descn => 'test_square_of_sums_to_10' , i_exp => 3025 , i_act => series#.square_of_sums(10) );
test(i_descn => 'test_difference_of_sum_to_5' , i_exp => 170 , i_act => series#.diff_of_squares(5) );
test(i_descn => 'test_square_of_sum_to_10' , i_exp => 3025 , i_act => series#.square_of_sum(10) );
test(i_descn => 'test_sum_of_squares_to_10' , i_exp => 385 , i_act => series#.sum_of_squares(10) );
test(i_descn => 'test_difference_of_sums_to_10' , i_exp => 2640 , i_act => series#.diff_of_squares(10) );
test(i_descn => 'test_square_of_sums_to_100' , i_exp => 25502500, i_act => series#.square_of_sums(100) );
test(i_descn => 'test_difference_of_sum_to_10' , i_exp => 2640 , i_act => series#.diff_of_squares(10) );
test(i_descn => 'test_square_of_sum_to_100' , i_exp => 25502500, i_act => series#.square_of_sum(100) );
test(i_descn => 'test_sum_of_squares_to_100' , i_exp => 338350 , i_act => series#.sum_of_squares(100) );
test(i_descn => 'test_difference_of_sums_to_100', i_exp => 25164150, i_act => series#.diff_of_squares(100));
test(i_descn => 'test_difference_of_sum_to_100', i_exp => 25164150, i_act => series#.diff_of_squares(100));
end run;
end ut_series#;
/
Expand Down