Im stuck in this exercise, it request the code to have only 7 lines, my best was 8.
repeat(5){
repeat(2){
move()
}
repeat(3){
shoot()
}
}
this was my best
Im stuck in this exercise, it request the code to have only 7 lines, my best was 8.
repeat(5){
repeat(2){
move()
}
repeat(3){
shoot()
}
}
this was my best
Can this be done in two lines?
got it, thank you ![]()
You also don’t need to use the second nested repeat loop:
repeat(3) {
shoot()
}
uses the same number of lines of code as:
shoot()
shoot()
shoot()