99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

CAN201代做、python語言程序代寫
CAN201代做、python語言程序代寫

時間:2024-10-27  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



CAN201 In Class Test 1 Thursday Session 2
Multiplayer Number Guessing Game (UDP Sockets)
Objective
This in class test is required to use Python for socket programming. You will create a multiplayer “number guessing” game using UDP sockets programming, with one server and multiple clients (two clients for testing).
Task Description
You need to implement two simple programs: a server and a client. The server manages the game logic, while the clients communicate with the server to participate in the game.
Game Rules:
Server Behavior
1. Initialization: The server listens/waits on a specified IP and port.
2. Client Connection:
o When a client connects, the server asks for the client’s name.
o After receiving the name, the client is marked as "ready". 3. Game Start:
o The game starts when all connected clients are "ready".1
o The server generates a random number (e.g., **100). 4. Gameplay:
o The server prompts each client in turn to guess the number. o The server checks the guess:
§ Ifcorrect,theserverannouncesthewinnertoallclientsandendsthegame.
§ If incorrect, the server informs all clients whether the guess is too high or
too low, and then prompts the next client.
o Next turn order: the player who guesses closest gets to guess first in the next turn. 5. Game End: The game ends when a client guesses correctly. (To make it simpler, no restart
is required. That means we only test once.)
Client Behavior
1. Connect to Server: Clients connect to the server using its IP and port of the server.
2. Submit Name: Clients send their name when prompted by the server.
3. Gameplay:
o Clients wait for their turn to guess.
o When prompted, the client sends a guess to the server.
o The client receives feedback from the server about their guess.
6. Game End: Clients are notified when the game ends. (To make it simpler, no restart is required. That means we only test once.)
1 When we test your code, we will start two clients (two clients code should let the server know their joining) first, and then enter client’s name one by one.
    
Implementation Requirements
• Language: Python 3.x
• Sockets: Use socket module, UDP protocol.
• Error Handling: Implement basic error handling for invalid inputs.
Program Execution
1. Server Execution (in terminal):
python server.py --ip <server_ip> --port <port> Example:
python server.py --ip 192.168.0.100 --port 42345
2. Client Execution (in terminal):
python client.py --ip <server_ip> --port <port> Example:
python client.py --ip 192.168.0.100 --port 42345
Submission
Package server.py and client.py into a zip file and submit it to Learningmall’s submission link.
Sample Interaction
Server Output
Server started on 192.168.0.100:42345 Client connected: (192.168.0.101, 54**1) Client connected: (192.168.0.102, 54**2) Received name: Alice
Received name: Bob
All clients are ready. Starting the game. Random number generated: 42
Prompting Alice to guess.
Received guess 30 from Alice. Too low. Prompting Bob to guess.
Received guess 50 from Bob. Too high. Prompting Bob to guess.
Received guess 42 from Bob. Bob wins! Client Output (Alice)
Connected to server at 192.168.0.100:42345 Enter your name: Alice
Waiting for other players...
Game started!
Your turn to guess.
Enter your guess: 30
Your guess is too low.
Waiting for your turn...
Bob guessed 50. The guess is too high.
       
Waiting for your turn...
Bob guessed 42 and won the game!
Client Output (Bob)
Connected to server at 192.168.0.100:42345 Enter your name: Bob
Waiting for other players...
Game started!
Waiting for your turn...
Alice guessed 30. The guess is too low. Your turn to guess.
Enter your guess: 50
Your guess is too high.
Your turn to guess.
Enter your guess: 42
Congratulations! You guessed the number!
Grading Criteria (Total: 5 points)
1. Functionality (2 points)
o 2 points: Correct implementation of game logic, including generating a random number,
prompting clients to guess in turn, evaluating the guess (higher/lower), and broadcasting
results to all clients.
o 1 point: Basic communication between the client and server is established, including
client connection and name registration.
o 0 point: No submission or incorrect submission.
2. Code Quality and Standards (1 point)
o 1 point: Code is well-structured, with appropriate comments, clear variable naming,
and logical organization.
o 0.5 points: The submitted program has no major syntax errors and can run correctly. o 0 point: No submission or incorrect submission.
3. Timely Submission (2 point)
o 2 points: Complete submission of server.py and client.py files during the lab. o 1 point: Complete submission of server.py and client.py files within 24 hours. o 0 points: Incomplete or late submission or missing any file.


    
請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp






 

掃一掃在手機打開當前頁
  • 上一篇:代做CENG 2310、代寫matlab設(shè)計編程
  • 下一篇:AM05 AUT24代做、代寫R設(shè)計編程
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                成人a免费在线看| 国产成人丝袜美腿| 91精品国产综合久久香蕉的特点 | 884aa四虎影成人精品一区| 日本精品裸体写真集在线观看| 国产成人免费视频精品含羞草妖精| 免费欧美在线视频| 青青草原综合久久大伊人精品优势 | 亚洲手机成人高清视频| 亚洲婷婷综合久久一本伊一区| 欧美极品美女视频| 中文字幕五月欧美| 一区二区三区精品在线| 天天av天天翘天天综合网色鬼国产 | 欧美性videosxxxxx| 在线观看免费一区| 欧美精品一卡二卡| 久久只精品国产| 国产精品乱人伦| 一二三区精品视频| 久久66热偷产精品| 99久久久国产精品| 在线播放一区二区三区| 久久久久久电影| 成人欧美一区二区三区| 亚洲va中文字幕| 国产一区二区导航在线播放| 91网站黄www| 日韩欧美电影在线| 国产精品久久夜| 午夜精品久久久久久久久久| 国产精品一区二区久久精品爱涩| 91同城在线观看| 欧美一级欧美一级在线播放| 国产精品久久久久久久久免费桃花| 五月激情六月综合| av一区二区久久| 欧美成人国产一区二区| 亚洲婷婷综合久久一本伊一区| 日韩av成人高清| 成人动漫一区二区三区| 欧美日韩在线精品一区二区三区激情 | 中文字幕在线观看一区二区| 亚洲成人自拍偷拍| 成人免费看的视频| 欧美一区二区日韩| 亚洲一区二区三区免费视频| 懂色av一区二区夜夜嗨| 91精品国产福利| 亚洲精品视频免费观看| 国产精品18久久久久久vr| 欧美色中文字幕| 国产精品久久福利| 久久99精品久久久久婷婷| 国产精品一区二区91| 欧美电影一区二区三区| 亚洲精品欧美专区| 成人中文字幕在线| 久久精品一区八戒影视| 秋霞国产午夜精品免费视频| 色综合色狠狠天天综合色| 久久久夜色精品亚洲| 欧美aaaaaa午夜精品| 欧美日韩国产大片| 一区二区三区加勒比av| 白白色 亚洲乱淫| 欧美激情一区二区三区蜜桃视频| 韩国精品久久久| 精品日韩在线观看| 美脚の诱脚舐め脚责91| 欧美一级一级性生活免费录像| 性做久久久久久久久| 色综合网色综合| 一区二区三区久久| 欧美在线观看禁18| 亚洲自拍偷拍综合| 精品污污网站免费看| 亚洲影视在线观看| 欧美伊人久久大香线蕉综合69| 亚洲免费高清视频在线| 欧美亚洲另类激情小说| 亚洲国产精品一区二区久久| 欧美亚洲综合久久| 天堂久久一区二区三区| 51久久夜色精品国产麻豆| 日本欧美在线看| 欧美精品一区在线观看| 国产成人免费av在线| 中文字幕视频一区| 欧美体内she精视频| 偷拍日韩校园综合在线| 精品国产人成亚洲区| 国产毛片一区二区| 亚洲色图丝袜美腿| 欧美视频在线一区二区三区| 日韩av成人高清| 国产亚洲精品免费| 91亚洲午夜精品久久久久久| 亚洲va国产va欧美va观看| 欧美电影免费观看高清完整版在线 | 99久久99久久免费精品蜜臀| 国产精品久线观看视频| 一本大道av一区二区在线播放| 亚洲国产裸拍裸体视频在线观看乱了 | 六月丁香综合在线视频| 精品国产免费人成在线观看| 国产精品综合在线视频| 亚洲女同女同女同女同女同69| 欧美体内she精视频| 久草精品在线观看| 亚洲色图欧洲色图| 日韩精品在线网站| 91精品福利视频| 国产精品一卡二卡在线观看| 一区二区欧美视频| 久久综合久久99| 欧美日韩亚州综合| 国产成人福利片| 天天影视色香欲综合网老头| 国产婷婷色一区二区三区| 6080国产精品一区二区| 成人av网在线| 另类小说一区二区三区| 亚洲一区二区在线免费看| 国产欧美视频一区二区三区| 欧美日韩精品三区| av一二三不卡影片| 国产在线一区二区| 午夜精品福利久久久| 国产精品高清亚洲| 精品国产区一区| 欧美一级淫片007| 欧洲一区在线观看| 粉嫩在线一区二区三区视频| 视频在线观看国产精品| 亚洲精品国产a| 国产亚洲精品aa| 日韩视频在线你懂得| 欧美日韩一级片在线观看| 成人综合在线网站| 国产剧情av麻豆香蕉精品| 日日摸夜夜添夜夜添国产精品| 亚洲美女免费视频| 中文字幕在线不卡一区二区三区| 久久久久久久综合狠狠综合| 4438x成人网最大色成网站| 色偷偷成人一区二区三区91 | 看国产成人h片视频| 国产精一区二区三区| 欧美经典一区二区| 国产宾馆实践打屁股91| 国产精品国产精品国产专区不蜜 | 色猫猫国产区一区二在线视频| 欧美一区二区三区四区高清| 久草精品在线观看| 亚洲视频一区在线观看| 欧美区一区二区三区| 国产一区二区三区久久悠悠色av| 欧美一区二区黄| 国产亚洲欧洲一区高清在线观看| 亚洲成人在线网站| 国产欧美日产一区| 91久久精品一区二区三区| 欧美精品免费视频| 国产一区二区三区久久久| 亚洲美女视频在线观看| 欧美精品一区二区三区视频| 亚洲综合激情另类小说区| 91精品福利视频| 亚洲欧美另类综合偷拍| 久久精品网站免费观看| 中文av字幕一区| 国产欧美一区二区在线观看| 国产欧美精品区一区二区三区| 国产婷婷一区二区| 亚洲视频一区在线观看| 亚洲一区二区视频在线| 日日摸夜夜添夜夜添国产精品| 美腿丝袜在线亚洲一区| 国产高清成人在线| 在线视频综合导航| 欧美大片顶级少妇| 国产精品水嫩水嫩| 夜夜精品视频一区二区| 日精品一区二区三区| 国产成人aaa| 在线亚洲高清视频| 2021国产精品久久精品| 国产精品毛片高清在线完整版 | 一区二区高清视频在线观看| 亚洲成av人影院在线观看网| 奇米影视7777精品一区二区| 国产成人av网站| 91传媒视频在线播放| 欧美xxxx老人做受| 亚洲欧美色综合| 国内成人免费视频| 91福利在线看| 国产日产欧美一区二区视频| 亚洲综合图片区|