import random
heads = 0
tails = 0
i = 0
while i < 1000:
rnd_value = random.randint(1, 2)
if rnd_value == 1:
heads += 1
print("heads")
else:
tails += 1
print("tails")
i += 1
print("Heads appeared {} times and tails appeared {} times".format(heads, tails))
I hope this helps!
Answer: High-level computer languages must be translated into assembly or machine languages by a compiler before they can be executed, making them slightly slower to execute than raw assembly or machine language. The answer is D.
Answer:
"(r->(~q))" is the correct answer for the above question.
Explanation:
- The proposition symbol is used to represent the sentence in symbols form. This symbols can also be called as logic symbols. There are so many specified symbols which is used to write the symbolic form for the sentence.
- For example, 'Not' is represent '~' and "if and then" is represented by the help of "->".
- The above symbolic statement is made with the help of 'r' and 'q'. which is mean as.
- if r then negation of q.
- Which can be (r->~q) which is the answer.
Answer:
Logic gates perform basic logical functions and are the fundamental building blocks of digital integrated circuits. Most logic gates take an input of two binary values, and output a single value of a 1 or 0.