• API
• FAQ
• Tools
• Archive
daily pastebin goal
91%
SHARE
TWEET

# Untitled

a guest Feb 14th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. ☐ Perfect Integers @created(18-01-31 18:21) @due(18-02-01 18:32)
2.         a positive integer (n > 0) that is equal to the sum of it's proper divisors
3.         divisors of 6 /= 1,2,3
4.         6 is Perfect Int because 1 + 2 + 3 == 6
5.
6.         1.) gather the user #
7.         2.) Check whether # is perfect integer or not
8.           a.) If so, tell that it is. Probably show the integers used to determine that it is a perfect integer
9.           b.) If not, tell that it is not. Probably show the integers used to determine that it is not a perfect integer
10.
11.         How to decide that it is a perf. integer
12.           while i is less than n (this will run until i >= n is true)
13.             if n modulo i equals 0 then
14.               sum += i
15.             else
17.           if sum is equal to n
18.             n is perfect number
19.           else
20.             n is not perfect number
21.       ☐ Find Slope + Intercept of line when given two points @created(18-01-31 18:21) @due(18-02-01 18:32)
22.         Pretty simple
23.         1.) gather the user's two points (±x1,±y1) -- (±x2,±y2)
24.         2.) equation for slope is (y2 - y1)/(x2-x1)
25.         3.) finding the y intercept (the 'b' in y=mx+b) is simple
26.           a.) the slope is m in y=mx+b
27.           b.) solve for b, so b = -(mx) + y
28.           c.) for x,y take xn, yn where n is one of the two points
29.           d.) solve for b
30.
31.         EXAMPLE (Done in SpeedCrunch)
32.           x1
33.           = 23
34.
35.           y1
36.           = −7
37.
38.           x2
39.           = 2
40.
41.           y2
42.           = 9
43.
44.           m = (y2−y1)/(x2−x1)
45.           = −0.76190476190476190476
46.
47.           b = −(m×x1) + y1
48.           = 10.52380952380952380952
49.
50.           b = −(m×x2) + y2
51.           = 10.52380952380952380952
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top