20 Antworten
+ 9
https://code.sololearn.com/cWJxJV6CiUk6/?ref=app
This is a geometric series. Can do this without importing anything
+ 11
num is 1
adder is 4
as long as u want
print num
add adder to num
add 2 to adder
+ 4
Learn the basic syntax of python ,and you would be able to implement it in few minutes , increment goes like this ,4,6,8,10,12
+ 4
It is so simple
Square of 1 +0
Square of 2 +1
Square of 3 +2
Square of 4 +3...
So on...👆
Got that?
+ 3
Jan Markus hehe , good solution 😂
+ 3
Take another variable as 0...increment its value in loop by one again and again...and then ads it to squares of numbers
+ 3
[ I * I + I - 1 for I in range(n+1)]
+ 2
Can you explain me?
+ 2
Jan Markus Motorola 68K 🙃
+ 2
Num = 1
Inc = 4
While(True):
Print(Num)
Num += Inc
Inc += 2
+ 2
Solution is here☺️☺️
https://code.sololearn.com/ce45DHnGI06B/?ref=app
+ 1
https://code.sololearn.com/cjv8GaRBT184/?ref=app
+ 1
Your step starts with 4 and increases by 2 in every loop.In pseudocode would look like this...
Increment = 4
X = 1
while <condition>
print X
X = X + Increment
Increment = Increment + 2
+ 1
It is so simple
Square of 1 +0
Square of 2 +1
Square of 3 +2
Square of 4 +3...
So on...👆
But how we can do
Help...
+ 1
Check this out
https://code.sololearn.com/cvozlDPceKK5/?ref=app
+ 1
Error
0
Jan Markus, dude why didn't you code it in assembly?
0
sequence here (first 20 numbers)
https://code.sololearn.com/cb1cAl4mz7zN/?ref=app
0
Hello guys,Does any of you know a site that gives me exercises with the solution in Python?
- 1
You can give me a code?