Sponsored Content
Full Discussion: writing math testing program
Top Forums Shell Programming and Scripting writing math testing program Post 302190512 by ccp on Tuesday 29th of April 2008 10:37:41 PM
Old 04-29-2008
writing math testing program

Can anyone create a program that
would test the math skills of the user. Assume that it would test integer addition, The program should ask the question,collect the integer response, evaluate and notify the user if their answer was correct or incorrect. I would assume integers in the range {1..100}.

either shell scripts or perl should be OK
Thanks a bunch
 

10 More Discussions You Might Find Interesting

1. Programming

basic math program 4 child

Iam writing a script for my sisters friends little brother i want the program to say hello lets say his name is Joe and ask him how he is and he can write a reply back saying fine and then it replys "Iam happy you are (his response) today and then it goes into a basic math where he can put in a... (9 Replies)
Discussion started by: perleo
9 Replies

2. What is on Your Mind?

I'm writing a new Linux program!

Yep, that's right. I'm writing a Linux binary that requires an X11 Server. It will also be released in a Shell, Win32, and Cocoa (Mac OS X). It's a program that's a text editor and more. It not just creates TXT and RTF files, it also can save in XML, RSS, and a whole lot of other formats. ... (11 Replies)
Discussion started by: Danny_10
11 Replies

3. UNIX for Dummies Questions & Answers

writing a program

i have written a very simple program in the vi editor, how do i now make it an executable file? (3 Replies)
Discussion started by: carlvernon
3 Replies

4. Shell Programming and Scripting

Need help on a program I'm writing

Hey guys.. I'm trying to learn how to script in bash... THIS IS NOT AN ASSIGNMENT but my instructor says to learn you must practice I'm trying to add to a program I'm writing that will print and save raw data... What syntax commands would I use to write them? And Thank you... (2 Replies)
Discussion started by: dmosheye
2 Replies

5. UNIX for Dummies Questions & Answers

Problem with writing a program

Hi guys I'm having trouble with trying to create a script which calculates the grade of a student and the marks out of 300. The grades are: 0-49% fail 50-59% pass 60-69% credit pass 70-79% distinction 80-100% high distinction less than 0 or greater than 100 displays error message. My... (1 Reply)
Discussion started by: CompNoob
1 Replies

6. UNIX Desktop Questions & Answers

need help writing a program to look for doubles

to determine if two two doubles are equal, we check to see if their absolute difference is very close to zero. . .if two numbers are less than .00001 apart, theyre equal. keep a count field in each record (as you did in p5). once the list is complete, ask the user to see if an element is on... (2 Replies)
Discussion started by: rickym2626
2 Replies

7. Programming

writing a shell program in ubuntu

Hi all, I have an assignment from school to write a shell program in linux. the idea is to exercise fork() and execv() functions.. the shell program is supposed to be the master and every command that the user prints will run in a new process. we also need to try running the command in every... (1 Reply)
Discussion started by: r3vive
1 Replies

8. Homework & Coursework Questions

Help with writing a tee program in 4 hours

1. The problem statement, all variables and given/known data: Basic Assignment Write a program similar to the Unix "tee" command. Program The Unix "tee" command is used to pull out copies of a data stream. It is typically used in conjunction with pipes (analogous to a T-joint in plumbing, hence... (1 Reply)
Discussion started by: izzy077
1 Replies

9. Homework & Coursework Questions

Need help writing a shell script program

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write the a shell script program to remove all space characters stored in the shell variable TEXT.... (7 Replies)
Discussion started by: kofine05
7 Replies

10. Shell Programming and Scripting

Perl math program

I have this math program on Perl and when I run it one of the math problems that comes up is 0/0 and perl makes the answer 4. How can I program perl to not include numbers /0? What I have for the division portion is: $solution = $num1 * $num2; ($solution, $num1) = ($num1, $solution); $question... (2 Replies)
Discussion started by: germany1517
2 Replies
math::numtheory(3tcl)						 Tcl Math Library					     math::numtheory(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
math::numtheory - Number Theory SYNOPSIS
package require Tcl ?8.5? package require math::numtheory ?1.0? math::numtheory::isprime N ?option value ...? _________________________________________________________________ DESCRIPTION
This package is for collecting various number-theoretic operations, though at the moment it only provides that of testing whether an inte- ger is a prime. math::numtheory::isprime N ?option value ...? The isprime command tests whether the integer N is a prime, returning a boolean true value for prime N and a boolean false value for non-prime N. The formal definition of 'prime' used is the conventional, that the number being tested is greater than 1 and only has trivial divisors. To be precise, the return value is one of 0 (if N is definitely not a prime), 1 (if N is definitely a prime), and on (if N is proba- bly prime); the latter two are both boolean true values. The case that an integer may be classified as "probably prime" arises because the Miller-Rabin algorithm used in the test implementation is basically probabilistic, and may if we are unlucky fail to detect that a number is in fact composite. Options may be used to select the risk of such "false positives" in the test. 1 is returned for "small" N (which currently means N < 118670087467), where it is known that no false positives are possible. The only option currently defined is: -randommr repetitions which controls how many times the Miller-Rabin test should be repeated with randomly chosen bases. Each repetition reduces the probability of a false positive by a factor at least 4. The default for repetitions is 4. Unknown options are silently ignored. KEYWORDS
number theory, prime CATEGORY
Mathematics COPYRIGHT
Copyright (c) 2010 Lars Hellstrom <Lars dot Hellstrom at residenset dot net> math 1.0 math::numtheory(3tcl)
All times are GMT -4. The time now is 10:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy