Answer:
Explanation:
The following code is written in Java and loops through 10 times. Each time generating 2 random dice rolls. If the sum is 10 it breaks the loop and outputs a "You Win" statement. Otherwise, it outputs "You Lose"
import java.util.Random;
class Brainly {
public static void main(String[] args) {
UseRandom useRandom = new UseRandom();
boolean youWin = false;
for (int x = 0; x<10; x++) {
int num1 = useRandom.getRandom(6);
int num2 = useRandom.getRandom(6);
if ((num1 + num2) == 10) {
System.out.println("Number 1: " + num1);
System.out.println("Number 2: " + num2);
System.out.println("You Win");
youWin = true;
break;
}
}
if (youWin == false) {
System.out.println("You Lose");
}
}
}
class UseRandom{
public int getRandom(int n)
{
Random r=new Random();
int rand=r.nextInt(n);
return rand;
}}
My idea on creating a new and fresh Gaming experience around viewing occasions is that one should incorporate emotions into games that people around around viewing occasions can feel.
<h3>What is a gaming experience?</h3>
Gaming is known to be that experience or one can say the origin of identity and also the community that is made for gamers.
Note that the experience is one that goes far more than the game itself, and as such, My idea on creating a new and fresh Gaming experience around viewing occasions is that one should incorporate emotions into games that people around around viewing occasions can feel.
Learn more about Gaming experience from
brainly.com/question/27355039
#SPJ1
Answer:
A. domain adminsb because maybe it might be the right answer.
Answer:
speed = float(input("Enter the speed: "))
hours = int(input("Enter the hours: "))
distance = 0
for i in range(hours):
distance += speed * 1
print("The distance after " + str(i+1) + ". hour(s): " + str(distance))
Explanation:
*The code is in Python.
Ask the user to enter the speed and the hours
Initialize the distance as 0
Create a for loop that iterates hours times. Inside the loop, calculate the cumulative distance traveled at the end of each hour and print it (Note that the distance = speed x hour)
Answer:
C. Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.
Explanation:
Byte pair encoding is a form of encoding in which the most common pairs of consecutive bytes of data are replaced by a single byte which does not occur within the set of data.
For example, if we has a string ZZaaAb, it can be encoded if the pairs of string ZZ are replaced by X and the second pair by Y. So, our data now becomes XYAb.
To get our original data, that is decode it, we just replace the data with the keys X = ZZ and Y = aa thus allowing our original data to be restored.
Since our original string is restored without loss of data, it implies that <u>byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.</u>