Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[Python] Why will nothing print inside of the while loop? while True: con, addr = s_soc.accept() data = con.recv(4096).decode() data = data.split(',') print(Client name:

[Python] Why will nothing print inside of the while loop?

while True: con, addr = s_soc.accept() data = con.recv(4096).decode() data = data.split(',') print("Client name: " + data[0]) print("Server name: " + ServerName) rand = random.randint(1, 100) Sum = str(rand + int(data[1])) sendMsg = ServerName + "," + str(rand) + "," + Sum con.send(sendMsg.encode()) con.close()

I know it's receiving the data because the data that gets sent back to the client is printed by the client so why won't anything print inside the server while loop? I tried just printing a random word in different locations in the while loop and nothing worked.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

What is the basic difference from facing and a cutoff operation?

Answered: 1 week ago

Question

Write formal and informal proposals.

Answered: 1 week ago

Question

What are the purposes of promotion ?

Answered: 1 week ago

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago