Latest Awards
Complete 10 python programs which focus on loops.

morgan

Score over 100 points in total

vincebanter10

Complete any 5 python programs

vincebanter10

Complete 3 python list based tasks

vincebanter10

Complete 5 python list based tasks

vincebanter10

Complete 10 python list based tasks

dman12

Score over 1000 points in total

april-logan

Complete any pygame task

april-logan

Complete any 3 pygame tasks

april-logan

You have to complete 5 pygame tasks

april-logan

Score over 500 points in total

sam-edmund

Complete any pygame task

sam-edmund

Complete any 3 pygame tasks

sam-edmund

You have to complete 5 pygame tasks

sam-edmund

Complete any pygame task

12wrigleyf

Complete any 3 pygame tasks

12wrigleyf

You have to complete 5 pygame tasks

12wrigleyf

Score over 500 points in total

jhoughton12

Complete any 10 python prograns

jhoughton12

Complete 10 python programs which focus on loops.

jhoughton12

Python Score
tasks = 0
achivements = 0
freestyle = 0
Total = 0
Top 5 Scores
114gilo 3490
2joss-nolan-2 2520
3alexdawkins 2515
4byrnebrian 2070
512wattsl 1740
Click to view all scores
Who else completed this task?
45 people have completed this task! Below are some of those users!

12rajah 12downieb
hxyshul 12wattsl
12boonhamf april-logan
12florance morgan
12gleesons thomaspep

Array Jigsaw

You can not trust code monkeys any more! You ask them to write some code but they end up giving it to you in the wrong order! Your task is to work out the correct order for the code below.

Following is a list of tasks you have to do using the code below

#1. Store numbers 2,8,4 in an array

#2.  prints the elements of the array

#3. store 5 as the a fourth element in the array

#4. reset the second element to 6

#5. uses the elements and prints the sum and the average of the elements.

*********************************************************************************

Re-arrange the code below to do the above tasks.

print "element of my_NumArray at position ", x, "is", my_NumArray[x]
while x < len(my_NumArray):
my_NumArray = [2,4,8]
x = x + 1
print "Sum is",sum
x=0
my_NumArray.append(5)
print "Average is ", sum / len(my_NumArray)
sum = sum + my_NumArray[x]
my_NumArray[1] = 6
sum = 0

You need to log in or create an account to submit code!

Leave a Reply

You must be logged in to post a comment.