Answer:
1111111111101111
Explanation:
The binary representation of 17 is 0000000000010001.
In order to get the binary representation of -17 we need to calculate the 2's complement of 0000000000010001.
Step 1 : 1s complement of 0000000000010001 = 1111111111101110
Step 2 : 2s complement => 1111111111101110 + 1 = 1111111111101111
This actually corresponds to the negative of the original number which was 17.
So the 2s complement representation of -17 is 1111111111101111 .
Answer:
file = open("numbers.txt")
numbers = []
for line in file:
numbers.append(int(line))
print("The numbers in the file: " + str(numbers[0]) + " " + str(numbers[1]))
print("The sum of the numbers: " + str(numbers[0] + numbers[1]))
Explanation:
The code is in Python.
Open the file named numbers.txt
Create an empty list, numbers, to hold the numbers in the file
Create a for loop that iterates through file and adds the number inside the file to the list
Print numbers
Calculate and print the sum of the numbers
I believe it would be “users cannot add new folders or files” i think they can only read what’s in the folder.
The relation between Power, Current and Voltage is given as:
P = V i
where P is Power in Watts,
V is Voltage in Volts,
and i is Current in Ampere.
We are given:
Power = 150 milliwatts = 0.15 Watts
(as 1 milliwatt = 0.001 Watts)
Voltage = 1.5 volts
and we need to find the current.
Hence using above equation:
P = V i
i = 
i = 
i= 0.1 Ampere
Answer:
The current used is 0.1 Ampere