Open lucydot opened 2 years ago
@lucydot
Summing up odd numbers
Write a for loop that sums up all odd numbers from 0 to 30.
for
sum = 0 for number in range(1,30,2): sum += number print(sum)
#
print
help()
?
if
elif
else
and
or
.png
mean
max
min
round
✨ @lucydot has up-voted! Total votes: 1
choochoo vote up
Your vote has been registered ☑️
Authors
@lucydot
Title
Summing up odd numbers
Question
Write a
for
loop that sums up all odd numbers from 0 to 30.Answer
Checklist items
#
print
to display valueshelp()
or?
(in Jupyter Notebooks) to access help documentation for a functionif
to control whether a block of code is executedfor
loop and anif
loop to implement a basic programming taskif
,elif
andelse
to implement a basic programming taskand
oror
.for
loop to populate a Numpy array.png
filemean
,max
,min
orround
across one or more array axes.✨ @lucydot has up-voted! Total votes: 1