r语言 分别用for 和witch语句编程练习

时间: 2023-08-31 09:03:56 浏览: 22
用for语句编程练习: 例如,我们想要计算1到10的平方数。 ```R # 使用for循环计算平方数 square_numbers <- c() # 创建一个空的向量用于存储平方数 for (i in 1:10) { square <- i^2 # 计算平方数 square_numbers <- c(square_numbers, square) # 将平方数添加到向量中 } print(square_numbers) # 打印平方数向量 ``` 上述代码中,我们首先创建一个空的向量`square_numbers`来存储平方数。然后使用for循环,将每个数字进行平方并将结果添加到向量中。最后打印出向量`square_numbers`即可。 使用switch语句编程练习: 假设我们有一个表示星期几的变量`day`,我们想要根据不同的`day`值输出相应的中文星期几的名称。 ```R # 使用switch语句输出星期几的名称 day <- 3 # 假设当前是星期三 week_day <- switch(day, "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日") print(week_day) # 打印星期几的名称 ``` 上述代码中,我们使用switch语句根据`day`的值选择相应的中文星期几的名称,并将结果赋值给`week_day`变量。最后打印出`week_day`即可。在此示例中,`day`的值为3,所以输出结果为"星期三"。

相关推荐

好的,下面是一些C语言中switch语句的练习题: 1. 编写一个程序,使用switch语句根据用户输入的数字输出对应的月份名称。 c #include <stdio.h> int main() { int month; printf("请输入月份(1-12):"); scanf("%d", &month); switch (month) { case 1: printf("一月\n"); break; case 2: printf("二月\n"); break; case 3: printf("三月\n"); break; case 4: printf("四月\n"); break; case 5: printf("五月\n"); break; case 6: printf("六月\n"); break; case 7: printf("七月\n"); break; case 8: printf("八月\n"); break; case 9: printf("九月\n"); break; case 10: printf("十月\n"); break; case 11: printf("十一月\n"); break; case 12: printf("十二月\n"); break; default: printf("输入的数字不在1-12范围内\n"); break; } return 0; } 2. 编写一个程序,使用switch语句根据用户输入的运算符计算两个数的结果。 c #include <stdio.h> int main() { double num1, num2, result; char op; printf("请输入两个数和一个运算符:"); scanf("%lf %c %lf", &num1, &op, &num2); switch (op) { case '+': result = num1 + num2; printf("%.2lf %c %.2lf = %.2lf\n", num1, op, num2, result); break; case '-': result = num1 - num2; printf("%.2lf %c %.2lf = %.2lf\n", num1, op, num2, result); break; case '*': result = num1 * num2; printf("%.2lf %c %.2lf = %.2lf\n", num1, op, num2, result); break; case '/': if (num2 == 0) { printf("除数不能为0\n"); } else { result = num1 / num2; printf("%.2lf %c %.2lf = %.2lf\n", num1, op, num2, result); } break; default: printf("输入的运算符不合法\n"); break; } return 0; } 3. 编写一个程序,使用switch语句判断用户输入的年份是否是闰年。 c #include <stdio.h> int main() { int year; printf("请输入年份:"); scanf("%d", &year); if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) { printf("%d年是闰年\n", year); } else { printf("%d年不是闰年\n", year); } return 0; } 上面这个例子
狼人杀是一款非常流行的桌面游戏,它的规则比较复杂,需要考虑到各种不同的情况。在Python中,我们可以使用面向对象的编程方式来实现这个游戏。 首先,我们需要定义一些角色类,包括狼人、村民、预言家、女巫等等。每个角色类都需要有自己的属性和方法,比如说狼人需要有杀人的能力,女巫需要有救人和毒人的能力等等。 接下来,我们需要定义一个游戏类,用来管理整个游戏的流程。游戏类需要有一些方法,比如说开始游戏、分配角色、指定第一个发言的人等等。游戏类还需要有一个状态变量,用来记录当前游戏的状态,比如说是白天还是黑夜,是否有人死亡等等。 最后,我们需要编写一个主程序,用来启动游戏。主程序需要创建一个游戏对象,并调用游戏对象的方法来开始游戏。 下面是一个简单的代码示例,实现了狼人杀游戏的基本功能: python import random class Player: def __init__(self, name): self.name = name class Werewolf(Player): def __init__(self, name): super().__init__(name) self.role = 'Werewolf' def kill(self, players): # 选择一名玩家杀害 victim = random.choice(players) print(f'{self.name} killed {victim.name}.') return victim class Villager(Player): def __init__(self, name): super().__init__(name) self.role = 'Villager' class Seer(Player): def __init__(self, name): super().__init__(name) self.role = 'Seer' def check(self, players): # 选择一名玩家查验身份 target = random.choice(players) print(f'{self.name} checked {target.name}, who is a {target.role}.') class Witch(Player): def __init__(self, name): super().__init__(name) self.role = 'Witch' self.poisoned = False self.saved = False def poison(self, players): # 选择一名玩家毒死 victim = random.choice(players) print(f'{self.name} poisoned {victim.name}.') victim.poisoned = True def save(self, victim): # 救治一名玩家 print(f'{self.name} saved {victim.name}.') victim.saved = True class Game: def __init__(self, players): self.players = players self.werewolves = [p for p in players if p.role == 'Werewolf'] self.villagers = [p for p in players if p.role != 'Werewolf'] self.seer = [p for p in players if p.role == 'Seer'][0] self.witch = [p for p in players if p.role == 'Witch'][0] self.dead = [] self.day = 1 self.state = 'Night' def start(self): print('Game start! Assigning roles...') for p in self.players: print(f'{p.name} is a {p.role}.') print('First night falls. Werewolves, please wake up and choose a victim...') victim = self.werewolves[0].kill(self.villagers) self.check_status(victim) def check_status(self, victim=None): if victim: self.dead.append(victim) if victim.role == 'Werewolf': self.werewolves.remove(victim) else: self.villagers.remove(victim) print(f'{victim.name} is dead.') if len(self.werewolves) == 0: print('Villagers win!') return if len(self.werewolves) >= len(self.villagers): print('Werewolves win!') return if self.seer in self.dead: print('Seer is dead.') self.seer = None if self.witch in self.dead: print('Witch is dead.') self.witch = None if self.state == 'Night': self.night() else: self.day += 1 self.state = 'Night' print(f'Night {self.day} falls. Werewolves, please wake up and choose a victim...') def night(self): victim = self.werewolves[0].kill(self.villagers) self.check_status(victim) if self.seer: self.seer.check(self.players) if self.witch: if not self.witch.saved and victim.poisoned: # 如果女巫没有救人且有玩家被毒死,则女巫不能再使用毒药 print('Witch cannot use poison again.') else: self.witch.poison(self.villagers) if not self.witch.saved: # 如果女巫没有救人,则可以使用解药救人 self.witch.save(victim) if self.witch and not self.witch.saved: # 如果女巫没有救人,则可以使用解药救自己 self.witch.save(self.witch) self.state = 'Day' print(f'Day {self.day} starts. Please discuss and vote.') 使用示例: python # 创建玩家 p1 = Werewolf('Wolf1') p2 = Werewolf('Wolf2') p3 = Villager('Villager1') p4 = Villager('Villager2') p5 = Seer('Seer1') p6 = Witch('Witch1') # 创建游戏 game = Game([p1, p2, p3, p4, p5, p6]) # 开始游戏 game.start() 这段代码只是一个简单的示例,只实现了基本的狼人杀游戏规则。你可以根据需要进行扩展和修改,加入更多的角色和游戏规则,让游戏更加有趣。
好的,以下是一个简单的 Python 狼人杀程序,有10个角色:3个狼人、3个平民、2个预言家、1个女巫和1个猎人。代码如下: python import random # 初始化角色 characters = ['wolf'] * 3 + ['villager'] * 3 + ['seer'] * 2 + ['witch'] + ['hunter'] random.shuffle(characters) # 初始化局面 alive_players = set(range(10)) dead_players = set() # 游戏开始 while True: # 狼人阶段 wolf_votes = {} for i in alive_players: if characters[i] == 'wolf': vote = random.choice(list(alive_players - {i})) if vote in wolf_votes: wolf_votes[vote] += 1 else: wolf_votes[vote] = 1 if wolf_votes: victim = max(wolf_votes, key=wolf_votes.get) if characters[victim] == 'hunter': dead_players.add(victim) alive_players.remove(victim) print('The hunter killed', victim+1) else: dead_players.add(victim) alive_players.remove(victim) print('The wolves killed', victim+1) if len(set(characters[i] for i in alive_players)) == 1: print('Game over. The', characters[alive_players.pop()], 'win!') break # 预言家阶段 for i in alive_players: if characters[i] == 'seer': print('Seer,', i+1, ',choose someone to check:') target = int(input())-1 if characters[target] == 'wolf': print(target+1, 'is a wolf') else: print(target+1, 'is not a wolf') # 女巫阶段 for i in alive_players: if characters[i] == 'witch': print('Witch,', i+1, ',do you want to use the potion (1) or not (0)?') use_potion = int(input()) if use_potion: print('Witch,', i+1, ',whom do you want to save?') target = int(input())-1 if target not in dead_players: print(target+1, 'is still alive') else: dead_players.remove(target) alive_players.add(target) print(target+1, 'has been saved') else: print('Witch,', i+1, ',whom do you want to poison?') target = int(input())-1 dead_players.add(target) alive_players.remove(target) print(target+1, 'has been poisoned') if len(set(characters[i] for i in alive_players)) == 1: print('Game over. The', characters[alive_players.pop()], 'win!') break # 白天阶段 print('The game enters the day phase. The dead players are:', dead_players) if len(set(characters[i] for i in alive_players)) == 1: print('Game over. The', characters[alive_players.pop()], 'win!') break vote_count = {} for i in alive_players: print('Player', i+1, ',', characters[i], ',please vote:') vote = int(input())-1 if vote in vote_count: vote_count[vote] += 1 else: vote_count[vote] = 1 if vote_count: victim = max(vote_count, key=vote_count.get) if characters[victim] == 'hunter': dead_players.add(victim) alive_players.remove(victim) print('The hunter killed', victim+1) else: dead_players.add(victim) alive_players.remove(victim) print('Player', victim+1, 'was executed') if len(set(characters[i] for i in alive_players)) == 1: print('Game over. The', characters[alive_players.pop()], 'win!') break 这个程序中有狼人阶段、预言家阶段、女巫阶段和白天阶段。在每个阶段中,程序会根据角色的不同,执行不同的操作。在每个阶段中,程序还会判断游戏是否结束,如果游戏结束,程序会输出获胜的角色。
狼人杀游戏是一款比较复杂的游戏,需要考虑到游戏规则、角色分配、交互方式等多个方面。以下是一个简单的狼人杀游戏代码示例,仅供参考。 c #include <stdio.h> #include <stdlib.h> #include <time.h> #define NUM_PLAYERS 9 int main() { // 初始化游戏角色 int roles[NUM_PLAYERS] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // 1表示狼人,2表示村民,3表示预言家,4表示女巫,5表示猎人 int num_wolves = 3; int num_villagers = NUM_PLAYERS - num_wolves - 3; int num_seer = 1; int num_witch = 1; int num_hunter = 1; // 随机分配角色 srand(time(NULL)); for (int i = 0; i < NUM_PLAYERS; i++) { int j = rand() % NUM_PLAYERS; int temp = roles[i]; roles[i] = roles[j]; roles[j] = temp; } // 输出角色分配情况 printf("角色分配如下:\n"); for (int i = 0; i < NUM_PLAYERS; i++) { switch (roles[i]) { case 1: printf("玩家%d是狼人\n", i+1); break; case 2: printf("玩家%d是村民\n", i+1); break; case 3: printf("玩家%d是预言家\n", i+1); break; case 4: printf("玩家%d是女巫\n", i+1); break; case 5: printf("玩家%d是猎人\n", i+1); break; default: break; } } // 开始游戏 int day = 1; while (num_wolves > 0 && num_wolves < num_villagers) { printf("第%d天开始了\n", day++); // 狼人行动 printf("狼人请行动\n"); // TODO: 狼人行动逻辑 // 预言家行动 printf("预言家请行动\n"); // TODO: 预言家行动逻辑 // 女巫行动 printf("女巫请行动\n"); // TODO: 女巫行动逻辑 // 白天投票 printf("天亮了,请大家投票\n"); // TODO: 投票逻辑 // 处理死亡角色 // TODO: 处理死亡角色 // 判断游戏是否结束 // TODO: 判断游戏是否结束 } // 游戏结束 if (num_wolves == 0) { printf("游戏结束,好人胜利\n"); } else { printf("游戏结束,狼人胜利\n"); } return 0; } 以上代码仅提供了一个基本的框架,需要自行补充各个角色的行动逻辑、投票逻辑、死亡处理逻辑等。同时需要注意游戏规则和角色分配可能会有多种不同的变化,需要根据实际情况进行修改。
这是一个简单的 Python 狼人杀文字小游戏,让玩家扮演村民和狼人,通过投票来决定谁是狼人,谁是村民。 python import random import time # 游戏角色 ROLES = { "werewolf": "狼人", "villager": "村民", "prophet": "预言家", "witch": "女巫", "hunter": "猎人" } # 游戏流程 def werewolf_game(): # 随机分配角色 roles = list(ROLES.keys()) random.shuffle(roles) players = {} for i in range(1, 7): players[i] = roles[i-1] print("游戏开始!") # 狼人和预言家先行动 werewolves = [k for k, v in players.items() if v == "werewolf"] prophet = [k for k, v in players.items() if v == "prophet"][0] print("狼人请睁眼,你们的同伴是:", werewolves) time.sleep(3) print("预言家请睁眼,选择要查验的玩家编号:") prophet_choice = int(input()) # 女巫行动 witch = [k for k, v in players.items() if v == "witch"] if witch: witch = witch[0] print("女巫请睁眼,选择是否使用解药,救哪个玩家?0表示不救,输入玩家编号:") antidote_choice = int(input()) print("女巫请睁眼,选择是否使用毒药,毒哪个玩家?0表示不毒,输入玩家编号:") poison_choice = int(input()) else: antidote_choice = 0 poison_choice = 0 # 白天投票 print("天亮了,现在开始投票:") vote = {} for k in players.keys(): vote[k] = 0 for i in range(1, 7): print("玩家{}请投票,输入要投出的玩家编号:".format(i)) choice = int(input()) vote[choice] += 1 max_vote = max(vote.values()) vote_results = [k for k, v in vote.items() if v == max_vote] if len(vote_results) == 1: print("玩家{}出局。".format(vote_results[0])) del players[vote_results[0]] else: print("得票最多的玩家有:", vote_results) time.sleep(3) print("请得票最多的玩家之间再次投票:") vote = {} for k in vote_results: vote[k] = 0 for i in range(1, 7): print("玩家{}请投票,输入要投出的玩家编号:".format(i)) choice = int(input()) if choice in vote: vote[choice] += 1 max_vote = max(vote.values()) vote_results = [k for k, v in vote.items() if v == max_vote] if len(vote_results) == 1: print("玩家{}出局。".format(vote_results[0])) del players[vote_results[0]] else: print("得票最多的玩家有:", vote_results) print("无人出局,继续游戏。") # 游戏结束条件 werewolves_left = len([v for v in players.values() if v == "werewolf"]) villagers_left = len([v for v in players.values() if v == "villager"]) if werewolves_left == 0: print("游戏结束,村民胜利!") elif werewolves_left >= villagers_left: print("游戏结束,狼人胜利!") # 主程序 while True: print("欢迎来到狼人杀游戏!") print("请选择:1 - 开始游戏,2 - 退出游戏") choice = int(input()) if choice == 1: werewolf_game() elif choice == 2: print("谢谢游玩,再见!") break else: print("无效选项,请重新输入。") 这个游戏使用了传统的狼人杀规则,有狼人、村民、预言家、女巫和猎人等角色。在游戏中,玩家需要通过投票来决定谁是狼人,谁是村民。每个角色都有自己的特殊能力,在游戏中起到不同的作用。 这个程序使用了简单的文字界面,玩家需要通过输入数字来做出选择。游戏逻辑比较简单,但可以作为一个基础来扩展更多的角色和游戏规则。
以下是一个简单的狼人杀程序代码,使用 C 语言编写: c #include <stdio.h> #include <stdlib.h> #include <time.h> // 定义角色类型 typedef enum { WOLF, // 狼人 VILLAGER, // 村民 SEER, // 预言家 WITCH, // 女巫 HUNTER, // 猎人 IDIOT, // 白痴 NUM_OF_ROLES // 角色总数 } Role; // 定义角色名字 char* role_names[NUM_OF_ROLES] = { "狼人", "村民", "预言家", "女巫", "猎人", "白痴" }; // 定义每个角色的数量 int num_of_roles[NUM_OF_ROLES] = { 2, // 狼人 5, // 村民 1, // 预言家 1, // 女巫 1, // 猎人 1 // 白痴 }; // 随机生成角色分配 void generate_roles(Role* roles, int num_of_players) { int i, j, k; int num_of_total_roles = 0; for (i = 0; i < NUM_OF_ROLES; i++) { num_of_total_roles += num_of_roles[i]; } if (num_of_total_roles < num_of_players) { printf("角色数量不足,无法分配\n"); return; } int num_of_unused_roles = num_of_total_roles; for (i = 0; i < num_of_players; i++) { // 从未使用的角色中随机选择一个 int role_index = rand() % num_of_unused_roles; for (j = 0; j < NUM_OF_ROLES; j++) { if (role_index < num_of_roles[j]) { roles[i] = j; num_of_roles[j]--; num_of_unused_roles--; break; } role_index -= num_of_roles[j]; } } } // 显示角色分配结果 void show_roles(Role* roles, int num_of_players) { int i; printf("角色分配结果:\n"); for (i = 0; i < num_of_players; i++) { printf("玩家%d:%s\n", i + 1, role_names[roles[i]]); } } int main() { srand(time(NULL)); // 初始化随机数种子 int num_of_players = 12; // 玩家数量 Role roles[num_of_players]; // 角色分配结果 generate_roles(roles, num_of_players); show_roles(roles, num_of_players); return 0; } 这个程序实现了随机分配狼人杀游戏中的角色,并且输出角色分配结果。你可以根据自己的需要修改角色数量、角色名字等参数。
在 Anaconda Prompt 中输入 pip 即可进入 pip 的界面。 例如: C:\> pip Usage: pip <command> [options] Commands: install Install packages. download Download packages. uninstall Uninstall packages. freeze Output installed packages in requirements format. list List installed packages. show Show information about installed packages. check Verify installed packages have compatible dependencies. config Manage local and global configuration. search Search PyPI for packages. wheel Build wheels from your requirements. hash Compute hashes of package archives. completion A helper command used for command completion. debug Show information useful for debugging. help Show help for commands. General Options: -h, --help Show help. --isolated Run pip in an isolated mode, ignoring environment variables and user configuration. -v, --verbose Give more output. Option is additive, and can be used up to 3 times. -V, --version Show version and exit. -q, --quiet Give less output. --log Path to a verbose appending log. --proxy Specify a proxy in the form [user:passwd@]proxy.server:port. --retries <retries> Maximum number of retries each connection should attempt (default 5 times). --timeout <sec> Set the socket timeout (default 15 seconds). --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup. --trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS. --cert Path to alternate CA bundle. --client-cert Path to SSL client certificate, a single file containing the private key and the certificate in PEM format. --cache-dir <dir> Store the cache data in <dir>. --no-cache-dir Disable the cache. --disable-pip-version-check Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index. --no-color Suppress colored output 在这个界面中,你可以使用各种 pip 命令来管理你的 Python 包。例如,你可以使用 pip install 命令来安装新的 Python 包,使用 pip list 命令来列出当前已安装的 Python 包,使用 pip uninstall 命令来卸载不需要的 Python 包等等。 希望这能
Cesium.js 是一个用于创建三维地球和地图可视化的JavaScript库。可以通过引入Cesium.js文件或者使用npm安装Cesium库来使用。引用提供了使用Cesium.js的一些示例代码,包括引入Cesium.js文件、设置密钥、绑定显示容器以及编写逻辑代码。你可以根据需要使用这些代码来创建自己的Cesium.js应用程序。引用也提供了一个使用Cesium.js的HTML模板,你可以参考其中的代码来构建你的网页应用。 总结起来,Cesium.js可以通过引入Cesium.js文件或者使用npm安装Cesium库来使用,然后根据需要编写代码来创建三维地球和地图可视化应用。123 #### 引用[.reference_title] - *1* *3* [Cesium简介——环境搭建](https://blog.csdn.net/gis_witch/article/details/122678955)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [(二)、Cesium 入门(npm安装)](https://blog.csdn.net/weixin_45611944/article/details/119009954)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

最新推荐

41 道 Spring Boot 面试题,帮你整理好了!.docx

图文并茂吃透面试题,看完这个,吊打面试官,拿高薪offer!

MATLAB遗传算法工具箱在函数优化中的应用.pptx

MATLAB遗传算法工具箱在函数优化中的应用.pptx

网格QCD优化和分布式内存的多主题表示

网格QCD优化和分布式内存的多主题表示引用此版本:迈克尔·克鲁斯。网格QCD优化和分布式内存的多主题表示。计算机与社会[cs.CY]南巴黎大学-巴黎第十一大学,2014年。英语。NNT:2014PA112198。电话:01078440HAL ID:电话:01078440https://hal.inria.fr/tel-01078440提交日期:2014年HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaireU大学巴黎-南部ECOLE DOCTORALE d'INFORMATIQUEDEPARIS- SUDINRIASAACALLE-DE-FRANCE/L ABORATOIrEDERECHERCH EEE NINFORMATIqueD.坐骨神经痛:我的格式是T是博士学位2014年9月26日由迈克尔·克鲁斯网格QCD优化和分布式内存的论文主任:克里斯汀·艾森贝斯研究主任(INRIA,LRI,巴黎第十一大学)评审团组成:报告员:M. 菲利普�

gru预测模型python

以下是一个使用GRU模型进行时间序列预测的Python代码示例: ```python import torch import torch.nn as nn import numpy as np import pandas as pd import matplotlib.pyplot as plt # 加载数据 data = pd.read_csv('data.csv', header=None) data = data.values.astype('float32') # 划分训练集和测试集 train_size = int(len(data) * 0.7) train_data = d

vmware12安装配置虚拟机

如何配置vmware12的“首选项”,"虚拟网络编辑器","端口映射”,"让虚拟机连接到外网”

松散事务级模型的并行标准兼容SystemC仿真

松散事务级模型的并行标准兼容SystemC仿真

AttributeError: 'MysqlUtil' object has no attribute 'db'

根据提供的引用内容,错误信息应该是'MysqlUtil'对象没有'db'属性,而不是'MysqlUtil'对象没有'connect'属性。这个错误信息通常是由于在代码中使用了'MysqlUtil'对象的'db'属性,但是该属性并不存在。可能的原因是'MysqlUtil'对象没有被正确地初始化或者没有正确地设置'db'属性。建议检查代码中是否正确地初始化了'MysqlUtil'对象,并且是否正确地设置了'db'属性。

数字化转型对企业业绩的影响研究以海尔智家为例.pptx

数字化转型对企业业绩的影响研究以海尔智家为例.pptx

泰瑞克·萨亚关联数据中的选择性披露和推理泄漏问题的研究

泰瑞克·萨亚关联数据中的选择性披露和推理泄漏问题的研究

Makefile:36: recipe for target '/home/l/海思/Hi3516CV500_SDK_V2.0.2.0/osdrv/tools/board/eudev-3.2.7/tmp/eudev-3.2.7/udevd' failed

根据提供的引用内容,可以看出是在进行make编译时出现了错误。具体来说,是在执行Makefile文件中第36行的目标'/home/l/海思/Hi3516CV500_SDK_V2.0.2.0/osdrv/tools/board/eudev-3.2.7/tmp/eudev-3.2.7/udevd'时出现了错误。可能的原因是该目标所依赖的文件或目录不存在或者权限不足等问题。需要检查Makefile文件中该目标所依赖的文件或目录是否存在,以及是否具有执行权限等。