Python Forum
A little help, I cannot find how to solve this
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A little help, I cannot find how to solve this
#3
(Nov-10-2016, 04:17 PM)nilamo Wrote: That's a massive block of text.  Could you maybe cut that down a bit so it's easier to read?  Maybe with only one or two lines of output, along with what you want the output to be?

And why not just multiply it?  
items = OPEX_evolution(25)
constant = 100
for item in items:
   print(item * constant)
Sorry for that, I did it that way so that it can be understood. 
The code you just given, it doesn't work. I tried before and I don't get anything. The point is when you define a function
def f(x):

   z=7

   for n in range(1,5):

       a= 2

       b=3

       c = a + b

       print(c)

   for n in range(5,x):

       h = z

       print(h)


f(7)
Outcome:       How f(7)*2 will give the outcome:   How f(7) outcome can be move into [5,5,5,5,7,7]

Output:
5              10 5              10 5              10 5              10 7              14 7              14
Edit admin:
Use code tag,look at BBCode help button in the middel of editor.
Reply


Messages In This Thread
RE: A little help, I cannot find how to solve this - by FGT - Nov-10-2016, 04:43 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020