Jump to content

Cheif Operations Director

Members
  • Posts

    1,633
  • Joined

  • Last visited

Everything posted by Cheif Operations Director

  1. I got this to work as well a = 0 def voltage(b): global c c = b+0 if c>a: print("Activate Response") Im reading your response
  2. It prints when c (-100) is > 0 which is obviously false. Im using SPYDER to run the code. This was the response from the console when I typed this into it In [54]: voltage(-100) Out[54]: -100 It always prints the response when I run the code. When I type it into the console I just get the number I typed into it back
  3. a = 0 def voltage(b): c = b+0 return c voltage(-100) if c>a: print("Activate Response") still runs Also when typing into a console it still will not print activate response yes
  4. That version seems to work best however it still works without be putting function(1) into the console. When I run it I get the message I only want to see when I call the function
  5. why is this code working on its own. a = 0 def voltage(b): global c c = b+0 if c>a: print("Activate Response")
  6. I got it to SORT of work Here was the code: a = 0 def voltage(b): global c c = b+0 voltage(1) if c>a: print("Activate Response") I still can not get it work in the console lol You read my mind Or I guess I read yours
  7. One second File "C:/Users/CENSOREDNAME/CENSOREDFILE/CENSOREDFILE/CENSOREDFILE/CENSOREFILE/Sensor Code B.py", line 11, in <module> if c>a: NameError: name 'c' is not defined In [36]: In [36]: voltage(1) a = 0 def voltage(b): c = b+0 if c>a: print("Activate Response")
  8. Thank for answering those questions: I was wondering what was wrong with this code The idea is that I have 0 (a) and 1 (b) and if a sensor calls the function titled voltage it inserts 1 into the b spot o the function. Then if this happens it names this number c ( I know its redundant ) Then if c>0 it will do something. Without using the actual hardware when I type voltage(1) into the console I should get the "Activate Response" printed. The idea of this is that if a sensor is activated it outputs 1 which causes the rest of the code to function. a = 0 def voltage(b): b+0 = c if c>0: print("Activate Response") The console is telling me that File "C:/Users/CENSOREDNAME/Desktop/CENSOREDFILE/CENSOREDFILE/CENSOREDFILE/Sensor Code B.py", line 9 0+b = c ^ ^ SyntaxError: can't assign to operator Ive tried flipping the b with the 0 and replacing the 0 with an "a" either way the very first part of the function is the problem.
  9. A good point about arms controls I will look into that. I think I will be fine but Ill double check. I will look into Rasberry PIs aswell.
  10. You could most likely mod KSP to have the physics (for the most part) for the real world and then transfer the movements of your rocket into Python. This way you are having your rocket move accurately. Im not sure how the second part would work as I do not code in any meaningful sense.
  11. Ive heard of the Arduino stuff and know it is good. What do you mean of by the right libraries? Can Arduino use Python?
  12. First for those who have remembered my old threads on coding I have decided to bite the proverbial bullet and learn python soon. I wanted to ask a few questions. First I have been informed by a mostly reliable source that Python can interface with hardware such as motors and electric "stuff" in general. This is true right? Secondly I have no intention of doing this anytime in the next year but is Python capable of making an AI of sorts. I ask all of this because I want to make a model rocket that has a full guidance system as well as staging system ect and I want to make sure before I put a bunch of time into learning this code that is it worth my time and is what Im looking for. Is this true? Finally are they any pointers that people can suggest to learning this language if it is really what im looking for.
  13. Did you see the second part of my quote? Ok I will try that when I get some time
  14. I can revert to 1.6.1 but it still wants me to accept the 2019 Eula I guess I should be more clear the forum stated the new EULA will be realised Mar 27 19 but my EULA stil, says last updated October 2018. Mine in fully up to date so which Eula is it?
  15. I'm not going to accept the new EULA. I want to play game on th latest version I can play with the old EULA. However when I tried reverting it in steam it still wanted by Approval for the new EULA. What is the last version with the old EULA? I want to double check I have it right
  16. Why do you need solar panels for the church all of frances electric already comes from Nuclear!
  17. They also did'nt have circuits in the 12th century any circuitry would have a circuit breaker Edit: not saying it's arson Perhaps but I'll go with the official story for now.
  18. Oh good grief these are styles of construction and style sir art. When I say modern sculpture art I'm referring to the art that is all the odd shapes put together.
  19. I saw the video I know it better I'm just saying that they are different If I reminder correctly (going to rewatch in a second) the Roman concrete was better for dealing with weather but not the loads if structures.
  20. It's an 800 year old church not a monument to being eco friendly. You can put solar panels on your local church not on Notre Dame. As for adding your "artistic elements" from the modern era... I do not want a painting that is a yellow scribble next to the paintings that stood before. This is a cathedral not a modern art project. Secondly why are you "laughing" ? Pantheon concrete is differant the modern concrete do not mind this Below ... it was an accident
×
×
  • Create New...