Answer:
#program in Python
#read until user Enter an integer
while True:
#try block to check integer
try:
#read input from user
inp = int(input("Enter an integer: "))
#print input
print("The integer is: ",inp)
break
#if input is not integer
except ValueError:
#print message
print("Wrong: try again.")
Explanation:
In try block, read input from user.If the input is not integer the print a message in except block.Read the input until user enter an integer. When user enter an integer then print the integer and break the loop.
Output:
Enter an integer: acs
Wrong: try again.
Enter an integer: 4a
Wrong: try again.
Enter an integer: 2.2
Wrong: try again.
Enter an integer: 12
The integer is: 12
Answer:
I think it's True but I don't know sorry if I'm wrong
Answer:
Sentences:
1.My computer has a virus
2.Technology may take over the world someday
Explanation:
To convert binary fraction to decimal fraction, we first write the given
.1011 (base 2)
The process of conversion is to break down to its decimal constituent,
.1011 (base 2) = (1*2^-1)+(0*2^-2)+(1*2^-3)+(1*2^-4)
.1011 (base 2) = 0.5 + 0 + 0.125 + 0.0625
.1011 (base 2) = 0.6875 (base 10)
<em>ANSWER: 0.6875 (base 10)</em>
Answer:
laptop is portable and wireless