subject

Python exercise c2 q4 Sam wants to write a code that will produce the following:
000
001
010
011
100
101
110
111

He doesn’t know where to start so he starts with the basic:
00
01
10
11

However, he also has trouble finishing this code. He only has a basic idea. Help him to complete the basic version first:

for i in range (0, 2):
for j in range (0, ): (1 mark)
print( i , ) (1 mark)

Now that you know the basic, complete the code that will print the chart 000, 001….all the way to 111 (Hint: look at the code you just complete. This time you probability need 3 for loops, one within another)

for i in range (0, 2):
for j in range ( , ): (2 mark)
for k in range ( , ): (2 marks)
print( , , k ) (1 mark)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:10
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What multimedia system creates an immersive, real-life experience that the user can interact with?
Answers: 1
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
You know the right answer?
Python exercise c2 q4 Sam wants to write a code that will produce the following:
000
00...
Questions
question
Mathematics, 03.10.2019 01:50
question
Mathematics, 03.10.2019 01:50
question
Mathematics, 03.10.2019 01:50
question
Mathematics, 03.10.2019 02:00
Questions on the website: 13722367