Python Forum
Creating Vector from a Program
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating Vector from a Program
#1
Hello everyone.
I am a new programmer.
I am trying to create a vector called "pressure", below is an example for the calculations that I have been trying to do.
Below is just a small piece from my code, which is the part that I am trying to solve. Also I simplified the "formula".


 
pressure = []

i = 1
    p0 = 50
    pcp0 = 20
    n = 10
    while i < n:
        p1 = p0 - 0.17 * pcp0
    for pressure in i:
        pressure.append(p1)
        i = i + 1
        p0 = p1 
The error is for pressure in i:
TypeError: 'int' object is not iterable
Reply


Messages In This Thread
Creating Vector from a Program - by ericvrocha - Oct-08-2019, 02:48 AM
RE: Creating Vector from a Program - by Gribouillis - Oct-08-2019, 07:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question How to understand the vector/direction mason321 0 1,132 Dec-14-2021, 10:57 PM
Last Post: mason321
  How to find vector of a 3D plot mason321 0 1,030 Nov-13-2021, 05:05 PM
Last Post: mason321
  creating simplex tableau pivot program easy or difficult for a beginner in Python? alex_0 2 2,611 Mar-31-2021, 03:39 AM
Last Post: Larz60+
  3D vector class with inheritance from 2D vector class buss0140 4 3,190 Dec-20-2020, 08:44 PM
Last Post: deanhystad
  Issue with def norm in class Vector DimosG 4 2,515 Mar-26-2020, 05:03 PM
Last Post: DimosG
  creating hex dump modifying program ensoniq 3 2,661 Oct-14-2019, 08:21 AM
Last Post: Larz60+
  Problem in creating a vector termo 11 3,965 Oct-10-2019, 03:09 PM
Last Post: stullis
  How to combine two float64 column vector? dsarica 1 2,429 Apr-17-2019, 07:22 PM
Last Post: Yoriz
  Creating a Mindmap program J_Miller 3 6,449 Apr-06-2019, 05:21 PM
Last Post: ichabod801
  creating a list during program execution. hobbyprogrammer 2 2,425 Jan-26-2019, 09:06 PM
Last Post: hobbyprogrammer

Forum Jump:

User Panel Messages

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