This is part of my code that does not work, it says, "There is an error in your code: invalid syntax. " Edit: This is part of the code that is broken: For the range (0, in the lane (digits)):
DIF histogram (data): def getFrequency (marks): freqList (0, data [i]): starsList.append ("*" for category in []: (0,101) for category: (0, 101): freqList.append (0): starsList = [] ) Pad if data [i] & lt; 10: pad = "" alif data [i] & lt; 100: stars = "". Category (list of stars) for print ("% d |% s% d"% (i, list of stars) for category (0, lane (digits)): mark = Icon [i] freqList [mark] + = 1 return freqList freq = getFrequency (mark) mode = maximum (freq) # print (freq)
This is the rest code (which is above the error part). I can keep it here, as it is relevant.
Random Import
DIF Bubble Sort (Data): count = 0 i Category (0, lane (data) - 1): sh Data for J in the line (0, lane (data) - 1): calculation = = 1 if data [j]> data [j + 1]: #swap temp = data [j] data [j] = data [jl + 1] Data [J + 1] = Temporary print (count) returns data
data = [5,4,3,2,1] data = bubble sort (data) print (data)
def getData ():
for the data = [] range I (0, 100): data.append (random.randint (0,100)) Return data Deaf meaning: total = 0: #add data [i] total = total + data [i ] Total / lane (data) back
Df max (Data):
Maximum = data for the range in [0] (0, lane): If the maximum is & lt; Data [i]: Max = data [i] max
DEF returns the minimum (data):
minimum = data in the [0] category I (0, lane (data)): If minimum & gt; Data [i]: minimum = data [i] minimum return
df mode (data):
points = meet ()
You are simply missing the right bracket here:
print ("% d |% S% d "% (i, list of stars)
No comments:
Post a Comment