1. (TCO 1) The number represented by the relationship (1 x 2 2 ) + (1 x 2 1 ) +
ID: 3672110 • Letter: 1
Question
1. (TCO 1) The number represented by the relationship (1 x 22) + (1 x 21) + (1 x 20) equals _____. (Points : 10)
1
2
6
7
Question 2.
309h
039h
777h
1D4h
Question 3.
117
118
125
177
Question 4.
input student
get input student
input = student
student = input(‘Enter name’)
Question 5.
area = s * s
area = = s * s
area = 1.0 * s^2
area = s^2
Question 6.
First_name = “Carlos”
First_name = ‘Carlos’
First_Name = ‘Carlos’
‘First_Name’ = “Carlos”
Question 7.
2 3
1 2 3
2 3 4
0 1 2 3
Question 8.
x = (bit0 * 1) + (bit1 * 2) + (bit2 * 4) + (bit3 * 8)
x = (bit0 * 0) + (bit1 * 1) + (bit2 * 2) + (bit3 * 3) + (bit4 * 4) + (bit5 * 5) + (bit6 * 6) + (bit7 * 7)
(bit0 * 1) + (bit1 * 2) + (bit2 * 4) + (bit3 * 8) + (bit4 * 16) + (bit5 * 32) + (bit6 * 64) + (bit7 * 128)
(bit0 * 128) + (bit1 * 32) + (bit2 * 64) + (bit3 * 16) + (bit4 * 8) + (bit5 * 4) + (bit6 * 2) + (bit7 * 1)
Question 9.
1
10
21
43
Question 10.
01001
11111
10010
00100
Question 11.
x = = y
x > = y
x < y
x < = y
Question 12.
print x, 'AND', y, ' in binary form equals ', '0x%z' % z
print x, 'AND', y, ' in binary form equals ', z
print x, ‘XOR’, y, ' in binary form equals ', bin(z)
print x, 'AND', y, ' in binary form equals ', bin(z)
Question 13.
2, 3, 4, 5
4, 9, 16, 25
2, 4, 3, 9, 4, 16, 5, 25
2, 4, 16
Question 14.
1, 2, 3, 4, 5, 6, 7, 8, 9, done
4, 5, 5, 6, 6, 7, 7 done
1, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, done
8, 10, 10, 12, 12, 14, 14 done
Question 15.
CASE statements
if and elif statements
SWITCH statements
if and else if statements
1. (TCO 1) The number represented by the relationship (1 x 22) + (1 x 21) + (1 x 20) equals _____. (Points : 10)
1
2
6
7
Explanation / Answer
1)1 is the answer
2) for the value of 676 in decimal 2A4 is the value in hexadecimal(i.e., base 16)
3)for the binary value of 01110101 in binary 117 is the value in decimal
4)student=input('enter student name')
5)area=1.0 * s^2
6)First_Name='Carlos'
7)2 3 is the output ...
8)(bit0 * 1)+(bit1 * 2)+(bit2 * 4)+(bit3 * 8)+(bit4 * 16)+(bit5 * 32)+(bit6 *64)+(bit7 * 128)
9)10 is the output
10)01001 is the result
11)x >= y
12)print x,'AND',y,'in binary form equlas',z
13)4 9 16 25
14)8, 10, 10, 12, 12, 14, 14, done
15) if and elif statements
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.