Assignment 4

Assignment 4

by Sabriya Jahangir -
Number of replies: 2

my output changes everytime i use this code in bash, is that normal?

 Rscript Magic.Analysis.R 1000
  The number of times the magician got the correct final card was 842 out of 1000 or 84.2 percent.


In reply to Sabriya Jahangir

Re: Assignment 4

by Erik Spence -
You tell me. Should your output be different every time you run the code? What is the code doing?
In reply to Erik Spence

Re: Assignment 4

by Sabriya Jahangir -
I think its normal because every time I run Rscript Magic.Analysis.R 1000, the code will do a random simulation:
it shuffles a deck randomly, and it randomly picks the volunteer and magician starting cards (within the first 10), then it repeats that experiment 1000 times.

initially i didnt understand how it was happening, but it makes sense.