Beruflich Dokumente
Kultur Dokumente
Name: Date:
7. What command can we use to make a list longer OR add an extra element to a list?
8. Write a command that will make/generate a random number between 100 to 1000?
def Line(symbol)
print(symbol * 12)
What is the name of this procedure used? Also name the parameter used with this procedure.
Page 1 of 4
10. This test refers to this short Python program.
testdata = “Rainbow”
openfile.write(testdata)
What is the name of the text file? If you opened the file what text would you see in the text file?
Marks]
1. Describe the complete Fetch-Decode-Execute cycle. Support your description with diagrams for
Page 2 of 4
2. Describe Logic Gates. Sketch the diagrams for AND, OR and NOT gate, also draw Truth Tables for
3. Write a complete code to generate a random element. Make sure you make a random list first, then
continue with the code to generate any random element from your list. [5]
Page 3 of 4
Page 4 of 4