One Item and a Conversion
Python
20 pts
One Item and a Conversion
Do two things:
- Create
capital, a tuple with only one item:"Asmara". - A list of marks is given. Create
marks_tupleby convertingmarksinto a tuple withtuple().
Then print the type of capital, the length of capital, and marks_tuple.
Expected output:
<class 'tuple'> 1 (78, 85, 90)
Checklist
- Create
capital, a tuple with only one item:"Asmara". - Create
marks_tupleby convertingmarkswithtuple(). Do not changemarks. - Print the type of
capital, the length ofcapital, andmarks_tuple.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
