print("A", "B", "A|B", "A&B", "not A")
for A in [False, True]:
for B in [False, True]:
print(A, B, A or B, A and B, not A)
In [ ]:
print("A", "B", "A|B", "A&B", "not A")
for A in [False, True]:
for B in [False, True]:
print(A, B, A or B, A and B, not A)
In [ ]:
number = 987
rbase = 16
result = ""
while number > 0:
remainder = number % rbase
result = str(remainder) + result
number = number // rbase
print(result)
In [18]:
## vraag de gebruiker om zijn of haar naam,
## en druk daarmee een groet af
In [ ]:
mass = input("Geef de massa (in kg): ")
velocity = input("Geef de snelheid (in m/s): ")
momentum = mass * velocity
print("Momentum: {} N/s".format(momentum))
In [ ]: