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, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
When you interpret the behavior of others according to your experiences and understanding of the world your evaluation is
Answers: 1
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
You know the right answer?
Python exercise c2 q4 Sam wants to write a code that will produce the following:
000
00...
Questions
question
History, 14.10.2020 01:01
Questions on the website: 13722361