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 06:00
The width of a piece of rectangular land is 5m shorter rhan 1/3 of its length .find the width of the land if the length is 60m,150m.
Answers: 1
question
Computers and Technology, 22.06.2019 07:30
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
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, 14.02.2021 03:50
question
Mathematics, 14.02.2021 03:50
question
Mathematics, 14.02.2021 03:50
question
Computers and Technology, 14.02.2021 03:50