• ⚠️ UK Access Block Notice: Beginning July 1, 2025, this site will no longer be accessible from the United Kingdom. This is a voluntary decision made by the site's administrators. We were not forced or ordered to implement this block. If you're located in the UK, we recommend using a VPN to maintain access.

nigelhernandez

nigelhernandez

Experienced
Apr 14, 2020
270
I'm trying to program two small problems regarding probability. I'm not exactly sure how to begin. Here there are below:

Toyoda
 
LastWhisper

LastWhisper

Who cares if I'm drunk?
Oct 29, 2019
223
Well, I know Java a bit. What do exactly you need?
 
S

summers

Visionary
Nov 4, 2020
2,493
I don't know Java, but my approach to #2 would be generate 2 random integers, lets say from 1 to 100. If both numbers are between:
1-50, win 10euro
51-77, win 20euro
78-92, win 50euro
93-98, win 200euro
99&100, win 1000euro
since the selection of integers from 1-100 is random, it doesn't make any difference statistically that prizes are grouped.

Beginning of #3 would be have a user input values into 5 variables, and check if each is equal to any of the previous between each input.
I'm not quite sure what the question is asking regarding the sum of 10 numbers, since there are only 5 being entered.
 
F

Frew

Member
Jan 7, 2020
62
I feel part one of the question contains missing details?
 
LastWhisper

LastWhisper

Who cares if I'm drunk?
Oct 29, 2019
223
The solution to the problem. Anything really.
I can write a code if you need. And as said above, it seems these problems a bit depends on something you not included here, so that details would be useful.
 
nigelhernandez

nigelhernandez

Experienced
Apr 14, 2020
270
I can write a code if you need. And as said above, it seems these problems a bit depends on something you not included here, so that details would be useful.

Thanks.,

Well basically we're on the topic of 'for' loops and arrays. I think we're supposed to solve it through that.

Could you post the code in private DM? please?
 
LastWhisper

LastWhisper

Who cares if I'm drunk?
Oct 29, 2019
223
Thanks.,

Well basically we're on the topic of 'for' loops and arrays. I think we're supposed to solve it through that.

Could you post the code in private DM? please?
I'll send in a half-hour.
Thanks.,

Well basically we're on the topic of 'for' loops and arrays. I think we're supposed to solve it through that.

Could you post the code in private DM? please?
For some reason I can't start a conversation, could you send me something in DM so I can reply you?
 
Last edited:

Similar threads

T
Replies
18
Views
750
Suicide Discussion
Thunderstorm
T
artificialpasta
Replies
24
Views
695
Politics & Philosophy
Poiter1987
P
amyuwu
Replies
6
Views
926
Suicide Discussion
Aquiles292
A
L
Replies
6
Views
334
Offtopic
bankai
bankai