Skip to content

Commit

Permalink
how web works
Browse files Browse the repository at this point in the history
  • Loading branch information
mboladop committed May 21, 2018
1 parent 1b3c2e2 commit c3540ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 1 addition & 3 deletions quiz.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def main():
print("3. Exit Game")

choice = input ("Please make a choice: ")

score=[]
score= 0

Expand All @@ -26,9 +27,6 @@ def main():
else:
print("WRONG")
print(score)




elif choice == "2":
f = open('questions.txt', 'a')
Expand Down
17 changes: 17 additions & 0 deletions tcpstuff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import socket

IP = '127.0.0.1'
PORT = 5555
MAXIMUM_QUEUE_SIZE = 0

listening_socket= socket.socket()
listening_socket.bind((IP, PORT))

listening_socket.listen(MAXIMUM_QUEUE_SIZE)
print("waiting for connection")

(client_socket, client_ip_and_port)= listening_socket.accept()
response="my response".encode()
client_socket.send(response)

print("bye bye")

0 comments on commit c3540ad

Please sign in to comment.