Skip to content

Commit f7e8e60

Browse files
authored
fixed print statements (#901)
1 parent 0652a18 commit f7e8e60

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

contents/approximate_counting/code/c++/approximate_counting.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ auto test_approximate_count(
6161
int main() {
6262
std::cout << "Counting Tests, 100 trials\n";
6363

64-
std::cout << "testing 1,000, a = 30, 1% error "
64+
std::cout << "testing 1,000, a = 30, 10% error "
6565
<< test_approximate_count(100, 1000, 30, 0.1) << "\n";
66-
std::cout << "testing 12,345, a = 10, 1% error "
66+
std::cout << "testing 12,345, a = 10, 10% error "
6767
<< test_approximate_count(100, 12345, 10, 0.1) << "\n";
6868
// Note : with a lower a, we need more trials, so a higher % error here.
69-
std::cout << "testing 222,222, a = 0.5, 10% error "
69+
std::cout << "testing 222,222, a = 0.5, 20% error "
7070
<< test_approximate_count(100, 222222, 0.5, 0.2) << "\n";
7171
}

contents/approximate_counting/code/c/approximate_counting.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ int main()
7171
srand(time(NULL));
7272

7373
printf("Counting Tests, 100 trials\n");
74-
printf("testing 1000, a = 30, 1%% error\n");
74+
printf("testing 1000, a = 30, 10%% error\n");
7575
test_approximation_count(100, 1000, 30, 0.1);
76-
printf("testing 12345, a = 10, 1%% error\n");
76+
printf("testing 12345, a = 10, 10%% error\n");
7777
test_approximation_count(100, 12345, 10, 0.1);
78-
printf("testing 222222, a = 0.5, 10%% error\n");
78+
printf("testing 222222, a = 0.5, 20%% error\n");
7979
test_approximation_count(100, 222222, 0.5, 0.2);
8080

8181
return 0;

contents/approximate_counting/code/julia/approximate_counting.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ function test_approximate_count(n_trials, n_items, a, threshold)
5151
end
5252

5353
@testset "Counting Tests, 100 trials" begin
54-
println("testing 1,000, a = 30, 1% error")
54+
println("testing 1,000, a = 30, 10% error")
5555
test_approximate_count(100, 1000, 30, 0.1)
56-
println("testing 12,345, a = 10, 1% error")
56+
println("testing 12,345, a = 10, 10% error")
5757
test_approximate_count(100, 12345, 10, 0.1)
5858
# Note: with a lower a, we need more trials, so a higher % error here.
59-
println("testing 222,222, a = 0.5, 10% error")
59+
println("testing 222,222, a = 0.5, 20% error")
6060
test_approximate_count(100, 222222, 0.5, 0.2)
6161
end

contents/approximate_counting/code/python/approximate_counting.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ def test_approximate_count(n_trials, n_items, a, threshold):
4141
if abs((avg - n_items)/n_items) < threshold:
4242
print("passed")
4343

44-
print("testing 1,000, a = 30, 1% error")
44+
print("testing 1,000, a = 30, 10% error")
4545
test_approximate_count(100, 1000, 30, 0.1)
46-
print("testing 12,345, a = 10, 1% error")
46+
print("testing 12,345, a = 10, 10% error")
4747
test_approximate_count(100, 12345, 10, 0.1)
48-
print("testing 222,222, a = 0.5, 10% error")
48+
print("testing 222,222, a = 0.5, 20% error")
4949
test_approximate_count(100, 222222, 0.5, 0.2)

0 commit comments

Comments
 (0)