Answer:
The solution code is written in Python 3.
- import random
-
- count = 0
- flag = False
- guess = int(input("Input your guess (2-12): "))
-
- while(count <=3):
- dice1 = random.randint(1, 7)
- dice2 = random.randint(1, 7)
-
- if((dice1 + dice2) == guess):
- flag = True
-
- count += 1
-
-
- if(flag):
- print("User wins!")
- else:
- print("Computer wins!")
Explanation:
A Random generator is needed for this question and therefore we start by importing Python random class (Line 1)
Next, create one counter variable,<em> count</em>, to ensure there will be only three rolling of the dices (Line 3). We need another variable, <em>flag</em>, to track the status if the two dices equal to the <em>guess</em> number chosen by user (Line 4).
Next, prompt use to input a guess number (Line 5).
Within the while loop, we can use random class method <em>randint() to </em>generate random integer. The arguments 1 and 7 will give one random number ranged from 1 to 6 for <em>dice1</em> and<em> dice2</em>, respectively (Line 8 - 9).
If the total of<em> dice1 + dice2</em> equal to user <em>guess</em>, we turn the<em> flag </em>to <em>True</em>. If not, the <em>flag </em>will remain <em>False</em> after completing entire while loop.
If the <em>flag </em>turned to <em>True</em>, print the message "User Wins!" else print the message ("Computer wins!")
Answer:
876100
019343
Explanation:
10s complement of a decimal number is obtained by the following process:
- Obtain 9s complement ( Subtract each digit by 9)
- Add 1 to the result
1) 123900
9s complement => (9-1)(9-2)(9-3)(9-9)(9-0)(9-0)
= 876099
Adding 1 , 10s complement of 123900 = 876100
2) 980657
9s complement = (9-9)(9-8)(9-0)(9-6)(9-5)(9-7)
= 019342
Adding 1 , 10s complement of 980657 = 019343
Answer:
Atomically is the term that describes the individuality in the computer field.So, the executing of the instruction in a program refers and the statement being executed in the individual manner.The atomic execution includes that the the instruction cannot be changed.
In programming terms, atomic action makes sure the a particular instruction will be executed in an isolation though the execution of other instruction might be taking place at the same point of time in the program.
The professional American organization for designers has set up many standards and guidelines that its members have to follow is known as ANSI.
<h3>What mean ANSI?</h3>
The American National Standards Institute (ANSI) is known to be a kind of private, non-profit organization that gives or coordinates the U.S. voluntary standards and the conformity in terms of assessment system.
Hence, The professional American organization for designers has set up many standards and guidelines that its members have to follow is known as ANSI.
Learn more about American organization from
brainly.com/question/19334871
#SPJ1
Answer:
It makes your brain work better and it's also fun.
Explanation:
The brain does not like just one thing it wants to have more experience.