Python Forum
C to Python code conversion print problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C to Python code conversion print problem
#2
It is difficult for someone to diagnose your problem when the only thing you provide is code that doesn't work the way you want. What is it supposed to do? This code would be difficult to analyze even if I knew what it is supposed to do. Names like v, n, d, c, p, j and k don't provide a lot of information. What should the output be? How does your output differ?

If I am forced to guess the first interesting thing I see is:
for i in range(n-1)
Is n the length of v? If so, the loop does not process the last element in v.
Reply


Messages In This Thread
RE: C to Python code conversion print problem - by deanhystad - May-22-2020, 04:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem Converting Tradingview Indicator to Python code kralxs 1 446 Apr-27-2024, 06:10 PM
Last Post: kralxs
  problem with print command in super() akbarza 5 789 Feb-01-2024, 12:25 PM
Last Post: deanhystad
  problem with spliting line in print akbarza 3 529 Jan-23-2024, 04:11 PM
Last Post: deanhystad
  problem with print lists MarekGwozdz 4 841 Dec-15-2023, 09:13 AM
Last Post: Pedroski55
  Python VS Code: using print command twice but not getting output from terminal kdx264 4 1,251 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  Problem with print variable in print.cell (fpdf) muconi 0 723 Dec-25-2022, 02:24 PM
Last Post: muconi
  I need to add data types to cython conversion python to c Good_AI_User 1 1,109 Aug-19-2022, 07:52 AM
Last Post: Gribouillis
  Problem with importing Python file in Visual Studio Code DXav 7 5,566 Jun-15-2022, 12:54 PM
Last Post: snippsat
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 2 6,689 Jul-09-2020, 04:46 PM
Last Post: srikanth7482
  Beginner Code, how to print something after a number of turns (guessing game) QTPi 4 2,943 Jun-18-2020, 04:59 PM
Last Post: QTPi

Forum Jump:

User Panel Messages

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