You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,4 +29,22 @@ The user enteres a number. The factorial of that number is calculated by multipl
29
29
The program generates a random number for the user to guess. The program tells the user if their guess was too high or too low, and tells them how many tries it took them when they get the number right. The program does not count multiple guesses of the same number.
30
30
31
31
**6. Smallest and Largest in a List**
32
-
The user enters a list of 5 numbers, and the program calculates and prints the smallest and largest numbers in the list.
32
+
The user enters a list of 5 numbers, and the program calculates and prints the smallest and largest numbers in the list.
33
+
34
+
**7. Palindrome Test**
35
+
The user enters a word (or sentence), and the program tests whether the string is a palindrome (i.e. the original and reverse of the word are spelled the same).
36
+
37
+
**8. Merge Two Lists and Sort**
38
+
The user enters two lists containing three numbers each. The program merges the two lists into one, and sorts the new list from lowest to highest.
39
+
40
+
**9. Newton's Square Root Method**
41
+
The user enters a number and their guess for the square root of that number. The program uses Newton's method to calculate the square root using the user's guess (z), the original number(x), and the new approximate(the equation result from the last iteration of the loop):
42
+
43
+
```
44
+
newApproximate = z - ((z* - x) / (2 * z))
45
+
```
46
+
47
+
*Not finished yet, need to make float more accurate (import decimal?) and loop stop when value starts changing by tiny amount.*
48
+
49
+
**10. Reverse a String**
50
+
The user enters a word or sentence. The program reverses the string using both the easy, built in `str(word)[::-1]` function, and a written function that loops through the string to reverse it manually. Both results are the same.
0 commit comments