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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:40, malibu777
Design a pos circuit that displays the letters a through j on a seven-segment indicator. the circuit has four inputs w, x, y, and z which represent the last 4 bits of the uppercase ascii code for the letter to be displayed. thus, if wxyz = 0001 then "a" will be displayed. (any answer with 22 or fewer gates and inverters, not counting any for the inputs, is acceptable)
Answers: 2
image
Computers and Technology, 22.06.2019 15:00, gmc2771
Hyperactive media sales has 10 windows 7 laptop computers used by sales-people in the organization. each laptop computer has several customized applications that are used during the sales process as well as customer relationship management software. all of the applications on the laptops are difficult to configure and have large data files. if all of the laptops have current hardware, what is the easiest way to install windows 10 on them?
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, elizabethburkha
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
image
Computers and Technology, 23.06.2019 13:10, BrianKeokot4534
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
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 in other subjects:

Konu
History, 06.11.2020 16:00
Konu
Mathematics, 06.11.2020 16:00