Recent content by ShaddollDa9u

  1. ShaddollDa9u

    How can I determine the curve and tension in a hammock with damaged cords?

    Homework Statement You want to rest on a hammock where the cords are damaged. a) If you don't want to the cords to break during your nap, do you have to place the hammock at the horizontal or, on the contrary, put the knot of the first rope higher than the other ? b) What is the curve made by...
  2. ShaddollDa9u

    Why am I getting 'nope' instead of 'works' when using sockets in Python?

    Yeah it works ! Thanks guys ! I didn't use the strip() method, I have just replaced the if condition by if("blabla" in data) and now it works fine. Thanks for the help guys.
  3. ShaddollDa9u

    Why am I getting 'nope' instead of 'works' when using sockets in Python?

    Now I have tried to put data = data.decode() and it seems that I don't have the " b'*my data*\r\n' " thing anymore, but still, the if condition is note satisfied. Here is my code now : import socket HOST = '' PORT = 8888 def main(): while 1: s =...
  4. ShaddollDa9u

    Why am I getting 'nope' instead of 'works' when using sockets in Python?

    I have converted now in str() but still getting " b'*my data*\r\n' ". What arguments do I have to put in strip to keep only my data?
  5. ShaddollDa9u

    Why am I getting 'nope' instead of 'works' when using sockets in Python?

    All the data seems to be received as " b'*my data*\r\n' ". I didn't make a client code, I connect to the server by the Linux command "telnet localhost 8888". The weirdest thing is that when I put print("#"+data+"#") as you said, I have the following error : Traceback (most recent call last)...
  6. ShaddollDa9u

    Why am I getting 'nope' instead of 'works' when using sockets in Python?

    I have tried to put print(data) before the if condition. It seems that the server is getting ---> b'quit\r\n' How do I fix it ?? PS: if I add ##, the following code wouldn't be considered as a comment ??
  7. ShaddollDa9u

    Why am I getting 'nope' instead of 'works' when using sockets in Python?

    Hi everyone, I have just started learning sockets in python and I have made the following code: import socket HOST = '' PORT = 8888 def main(): while 1: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT))...
  8. ShaddollDa9u

    Calculating Post-Collision Momentum and Speed of Two Balls

    I couldn't get it, does the sign of the momentum of A is inversed after the collision ? So ma * va + mb * vb = - (ma * va') + mb * vb' ??
  9. ShaddollDa9u

    Calculating Post-Collision Momentum and Speed of Two Balls

    Wikipedia says "An elastic collision is an encounter between two bodies in which the total kinetic energy of the two bodies after the encounter is equal to their total kinetic energy before the encounter." So according to that, we will also have : (1/2)ma*va² + (1/2) mb*vb² = (1/2)ma*va'² +...
  10. ShaddollDa9u

    Calculating Post-Collision Momentum and Speed of Two Balls

    Homework Statement Homework Equations I have thought about using the momentum formulas here. The Attempt at a Solution As the momentum is a conservative quantity, I have thought that p (before collision) = p(after collision). Since p (before collision) = 12, I wanted to use that result to...
  11. ShaddollDa9u

    Electrostatics and symmetry

    Homework Statement "Find the direction and the variables which the electrostatic field depends on at all points of the plane (xOy) uniformly charged with the density of positive charges ϱ" The Attempt at a Solution So first of all, I have to study the Invariances of symmetry. I tried to...
  12. ShaddollDa9u

    Charge stored in a capacitor

    I see now, so at the end, we will have the two capacitors C2 and C3 in series, which we can consider as a single capacitor Ca = 2/3. By applying Q = Ca . V, we have : Q = (2/3) . 60 = 40. And since the two capacitors does have the same charge, C2 has a charge of 40. Is it correct ?? Thank you...
  13. ShaddollDa9u

    Charge stored in a capacitor

    So if we have Ca = C2 + C4, the charge stored by that capacitor will be q = 2 x 60 = 120, right ?? But then what do I do ?? Isn't it the same thing that I had tried in my first attempt ?
  14. ShaddollDa9u

    Charge stored in a capacitor

    The potential difference across C1 is 0 since C2 = C4 and C3 = C5. I have thought about the fact that the voltage across C2 may be incorrect, but in that case how can I find it ? Kirchhoff's law doesn't seem to help in this case
  15. ShaddollDa9u

    Charge stored in a capacitor

    Homework Statement Question : How much charge is stored on the capacitor C2 ? 2. Homework Equations Q = C . U The Attempt at a Solution [/B] Since Q2, the charge stored on the capacitor, is C2 . (Va - Vb) , I thought that I just had to multiply 1.0 x 60 = 60. But in fact, the expected...
Back
Top