Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c315c58

Browse files
Added to readme
1 parent a8436be commit c315c58

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

‎README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,22 @@ The user enteres a number. The factorial of that number is calculated by multipl
2929
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.
3030

3131
**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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /