Answer to Question #207816 in Electrical Engineering for sarah

Question #207816


Write and execute a PYTHON program to perform the following tasks

1.Write a Python program to create a tuple with 10 items and display the first 3 items.


1
Expert's answer
2021-06-18T07:55:22-0400

The Python code may look like follows:

#Create a tuple with 10 items
tuplex = ('ENG', 10, 'Apple', 20, 'Sixty 69', 30, 12, '1^2+b^2=c^2', 11, 1)
#Display the first 3 items 
print("The first 3 items: ", tuplex[0:3])

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS