JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Gallery
Solution Debug 7.1. Bracket Bamboozle
Share
Explore
Gallery
Solution Debug 7.1. Bracket Bamboozle
Solution Debug 7.1. Bracket Bamboozle
Solution
The Task
Python Starter Code
CodeClips
Solution
Solution
solution
# print a heading
print
(
"\nAncient Roman Lottery\n"
)
# sets up array of numbers with 6 roman numbers
lotteryNumbers
=
[
'III'
,
'IV'
,
'XIV'
,
'XXII'
,
'XXX'
,
'XLIV'
]
# repeats for the size of the array and prints each out element
for
i
in
range
(
0
,
len
(
lotteryNumbers
)
,
1
)
:
print
(
lotteryNumbers
[
i
]
)
print
(
'\n\n'
)
# display blank line (2)
original
# print a heading
print
(
"\nAncient Roman Lottery\n"
)
# sets up array of numbers with 6 roman numbers
lotteryNumbers
=
(
III
,
IV
,
XIV
,
XXII
,
XXX
,
XLIV
)
# repeats for the size of the array and prints each out element
for
i
in
range
(
0
,
len
(
lotteryNumbers
)
,
1
)
:
print
(
lotteryNumbers
{
i
}
)
print
(
'\n\n'
)
# display blank line (2)
Gallery
Share
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.