| Thread Closed |
Beginner to Mathematica's question! using Module! |
Share Thread | Thread Tools |
| Nov5-08, 11:01 PM | #1 |
|
|
Beginner to Mathematica's question! using Module!
Okay, this is the question that i need to solve using mathematica:
Define the function f(n) which counts the number of zeros in n if n is the integer greater than 0. If you input 105, 1005, 10005, find f(n). I want to use Module in this question and I just found out that i have to use "Mod", "Count" and "Floor" but still havent figured out this. Please help! |
| PhysOrg.com |
science news on PhysOrg.com >> Hong Kong launches first electric taxis >> Morocco to harness the wind in energy hunt >> Galaxy's Ring of Fire |
| Nov8-08, 04:30 AM | #2 |
|
|
Of course, IntegerDigits and Count would solve the question right away, but I suppose that's no fun
![]() Anyway, I suggest first trying to write down a general algorithm, then programming it in a Mathematica notebook, and only in the final step putting it all in one module. For example, how would you use the functions you quoted to get the i-th digit? |
| Thread Closed |
| Tags |
| count, floor, mathematica, mod, module |
| Thread Tools | |
Similar Threads for: Beginner to Mathematica's question! using Module!
|
||||
| Thread | Forum | Replies | ||
| A Problem with Mathematica's Precision | Math & Science Software | 1 | ||
| Beginner question | Differential Equations | 2 | ||
| Beginner Boolean question | Programming & Comp Sci | 2 | ||
| Beginner Question | Introductory Physics Homework | 3 | ||
| beginner question | Introductory Physics Homework | 4 | ||