Python Forum
Is this right/ what should i change?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is this right/ what should i change?
#1
# 3. Using the following list and a “for” loop, display differences of all consecutive pairs of numbers in the list.

our_list = [1,2,5,6,3,77,9,0,3,23,0.4,-12.4,-3.12]

for i in our_list:
print(i-1)
Reply


Messages In This Thread
Is this right/ what should i change? - by ralfi - Sep-20-2017, 06:12 PM
RE: Is this right/ what should i change? - by ralfi - Sep-20-2017, 07:18 PM
Index out of range - by ralfi - Sep-22-2017, 08:11 PM
RE: Index out of range - by snippsat - Sep-22-2017, 08:28 PM

Forum Jump:

User Panel Messages

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