I want this type of series in python -- 1,5,11,19,29,41........ | SoloLearn: Learn to code for FREE!

+1

I want this type of series in python -- 1,5,11,19,29,41........

Any one can help me using python

10/17/2020 6:39:32 PM

Satyam Mishra

25 Answers

New Answer

+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

+11

QTWizard I owned a computer with the Motorola 68k in the past. It was a Commodore Amiga 2000. It had 1 MB of RAM, two 3,5"-disk drives, a 4-voice-stereo soundcard with playback of digital samplings, a video card which could display 4096 different colors at once. It was a phenomenal device in comparison to the most other computers on the market in the time of the late 1980s and beginning 1990s.

+10

You will find the solution in the attached file: https://code.sololearn.com/cXdscFby1Jnr/?ref=app

+10

QTWizard I could offer Microchip PIC 12F675 🤔

+8

Satyam Mishra insert the line print(r) in line 4, and you will see the revealed code. 😁😁😁

+6

QTWizard Assembly language for which processor architecture?

+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