Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
random
- Page 1
Re: Dynamic Properties in PHP 8.2
Programming
Web Development
3 Weeks Ago
by Dani
… of getters and setters for a reason, and just creating
random
properties on a whim defeats the purpose of organizing and…
Re: Coin Flip (Python Newbie)
Programming
Software Development
1 Month Ago
by jassonadder
…Here's a corrected version of your code: import
random
coin_heads = 0 coin_tails = 0 timesflipped = 0 …while timesflipped < 100: coin_flips =
random
.randrange(2) if coin_flips == 0: coin_heads += 1 else: coin_tails…
Re: Java Coin Flip Program
Programming
Software Development
1 Month Ago
by jassonadder
… result, and then shows the totals at the end: import
random
class CoinFlipper: def __init__(self): self.heads = 0 self.…def flipCoin(self, times): for i in range(times): flip =
random
.choice(['Heads', 'Tails']) print(f"Flip {i+1}: {flip…
Re: Cannot run exe from asp.net
Programming
Web Development
2 Months Ago
by Neil_brown001
… development web server (Kestrel or IIS Express), which picks a
random
port. In production, IIS will usually use port 80 or…
Re: Cannot run exe from asp.net
Programming
Web Development
2 Months Ago
by lennyli
… development web server (Kestrel or IIS Express), which picks a
random
port. In production, IIS will usually use port 80 or…
Re: Lots of new members but no one posts
Community Center
Meta DaniWeb
1 Month Ago
by Dani
… down versions of Google-recommended techniques. You now have some
random
person in India hired by an SEO firm who is…
Re: Coin Flip (Python Newbie)
Programming
Software Development
1 Month Ago
by Dani
> Presumably bumping every "coinflip" post to spam their URL Nothing wrong with that!! I'll take a trillion helpful posts if all someone wants in exchange is a free signature link back to their website (that only shows up for logged in members, so no SEO incentive).
Re: Coin Flip (Python Newbie)
Programming
Software Development
1 Month Ago
by woooee
while timesflipped < 100: timesflipped += 1 Use a for loop instead. if coin_flips == 0: And no need to add the == 0. Just *if coin_flips* (i.e. not zero) is enough
Re: Coin Flip (Python Newbie)
Programming
Software Development
1 Month Ago
by Reverend Jim
When you want to do a loop a given number of times (e.g. 100) but the loop counter is not used you can do for _ in range(100): # rest of code here
Random number functions
Programming
Software Development
15 Years Ago
by mrnutty
Random
number generator under its own namespace. Its a sample program.
Random Audio Commercials?
Hardware and Software
Information Security
15 Years Ago
by firebat757
Random
audio commercials play when I have no browsers or windows …
Random number and Mode
Programming
Software Development
11 Years Ago
by chubbyy.putto
Random
Number: Whenever I run it show me an error. Here …
Re: Random Number Generator with MinGW and Boost
Programming
7 Years Ago
by rubberman
Random
number generators is a "mature" science. This may help you understand the subject matter: http://www.phy.ornl.gov/csep/CSEP/RN/RN.html
Re: Random number generation in C#
Programming
Software Development
12 Years Ago
by arunkumars
….Next() finds the next
random
# bet 100 and 1000 int numberTotal = 0; //declaring the variable &…(100, 1000); Console.WriteLine(number.ToString()); //program prints the next
random
# //numberTotal += number; //need to keep a running sum of the…
Re: Random number generation
Programming
Software Development
20 Years Ago
by FireNet
Random
Number generation is easy but when you call rand() you only get a number from an array.To get true
random
numbers you have to seed that array using srand(); call srand(GetTickCount());Then you start getting
random
numbers.
Re: Random Access Vs. Sequential access (When to use which)
Programming
Software Development
17 Years Ago
by Narue
Random
access is for when you can't predict the access … a sequential pattern, or the access medium doesn't support
random
access.
Re: Random shutdowns
Hardware and Software
Microsoft Windows
16 Years Ago
by EMCCleveland
Random
shut downs are a bit difficult to track down but …
Re: random printing???
Programming
Software Development
15 Years Ago
by Stefano Mtangoo
Random
number mean that it changes value. The position is the same. Did you wanted to change position or value?
Re: Random Function
Programming
Software Development
13 Years Ago
by ashok1514
random
function in C having some restrictions..........
Re: Random class c#
Programming
Software Development
11 Years Ago
by Sulaiman_1
Random
rObj =new
Random
(); int n= rObj.next(10);
Re: random access file help please
Programming
Software Development
17 Years Ago
by SCBWV
Random
Access files use records, much like a database, but you …
Re: Random class c#
Programming
Software Development
11 Years Ago
by Ketsuekiame
Random
number generators, in a lot of cases, need to be …
Re: random
Programming
Software Development
13 Years Ago
by ravenous
`srand` doesn't generate a
random
number, it sets the seed for the
random
number generator. The `time` part is using the current…` - the function that generates the actual
random
number. It limits the maximum value that the
random
number can take to be less… than N (6 in this case). The
random
number is stored in `r` on line 22 and is…
Re: random
Programming
Software Development
20 Years Ago
by vex
[QUOTE=tonakai]wow... try this.... [CODE]
Random
random
= new
Random
(); boolean a =
random
.nextBoolean(); [/CODE][/QUOTE] Worked great. I was looking in Math and not
Random
. Thanks
random
Programming
Software Development
13 Years Ago
by lewashby
…; srand(time(NULL)); // set a seed for
random
-number generation. cout<< "Enter number…quot;; } system("pause"); return 0; } //
random
0 to n1 function int rand_0toN1(int n) { return rand… Also, if this line is generating a
random
number where is it storing the number, …
Re: random
Programming
Software Development
13 Years Ago
by adityatandon
… run the program and when it isnt initialised with a
random
variable at any time, it will always generate the same… set of
random
numbers... Run it at 4:00 Am, it'll probably…:00 pm 4 days later.. the same thing... Not so
random
are they then ?
Random.
Programming
Software Development
12 Years Ago
by Ashenvale
…void IntRandom(int intNumber) { int intNum[] = new int[36];
Random
randomGen = new
Random
(); intNum[0] = randomGen.nextInt(intNumber)+1; do{ intNum[1…
Re: random
Programming
Software Development
20 Years Ago
by tonakai
wow... try this.... [CODE]
Random
random
= new
Random
(); boolean a =
random
.nextBoolean(); [/CODE]
Re: Random.
Programming
Software Development
12 Years Ago
by Ashenvale
int intNum[] = new int[36]; int tempNum;
Random
randomGen = new
Random
(); intNum[0] = randomGen.nextInt(intNumber)+1; for(int ctr=1; …
Re: random
Programming
Software Development
12 Years Ago
by somjit{}
not sure if "more" or "less"
random
really make much sense mathematically ... but maybe you could try a switch - case block , and run different code for different cases for different output of the
random
method.. that way , you can easily write up an increasing number of cases and well.. make it feel more
random
...
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC