上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 65 下一页
摘要: # md5 加盐 fqs import hashlib def get_md5_y(psw,salt): psw += salt obj_psw_md5 = hashlib.md5(psw.encode('utf-8')) obj_str = obj_psw_md5.hexdigest() prin 阅读全文
posted @ 2023-07-25 14:35 胖豆芽 阅读(11) 评论(0) 推荐(0) 编辑
摘要: import json # # 假设有一个 JSON 对象 # data = { # "name": "John", # "age": 30, # "city": "New York" # } # # # 将 JSON 对象转换为字符串 # json_str = json.dumps(data) # 阅读全文
posted @ 2023-07-25 11:58 胖豆芽 阅读(15) 评论(0) 推荐(0) 编辑
摘要: # 羊 老虎 饲养员 # 父类 import random class Animal(): # 属性 def __init__(self,animal,w,call,food,room_num): self._animal = animal self._w = w self._call = call 阅读全文
posted @ 2023-07-24 11:13 胖豆芽 阅读(3) 评论(0) 推荐(0) 编辑
摘要: # 老虎 羊 喂养 import random # 父类 class Animal(): # 属性 def __init__(self,animal,w,call,food,room_num): self._animal=animal self._w=w self._call=call self._ 阅读全文
posted @ 2023-07-23 21:22 胖豆芽 阅读(6) 评论(0) 推荐(0) 编辑
摘要: # 羊 老虎 import random # 动物 class Animal(): def __init__(self,animal,weight,call,food,room_num): self._animal = animal self._weight = weight self._call 阅读全文
posted @ 2023-07-22 22:03 胖豆芽 阅读(4) 评论(0) 推荐(0) 编辑
摘要: # 求1到这个数阶乘 #1*2*3*4=24 def fac(num): result=1 for i in range(1,num+1): result *= i return result mul=fac(4) print(f'阶乘结果:{mul}') 阅读全文
posted @ 2023-07-21 16:34 胖豆芽 阅读(37) 评论(0) 推荐(0) 编辑
摘要: # 求10以内的质数 只能被自己和本身整除 # 2除以1是2 余数是0 # 2除以2是1 余数是0 # 4不是质数 因为4/2等于2 能被2整除 # 9不是质数 9%3 ==0 能被3整除 list_ob=[1,] for num in range(2,10): flag = True # 是质数吗 阅读全文
posted @ 2023-07-21 14:19 胖豆芽 阅读(58) 评论(0) 推荐(0) 编辑
摘要: import allure import pytest import os @allure.epic('微信')# Epic(史诗)是指一个大型的任务 @allure.feature('首页') #feature通常包括详细的功能描述、特定的输入和预期的输出 @allure.story('登录') 阅读全文
posted @ 2023-07-21 13:33 胖豆芽 阅读(7) 评论(0) 推荐(0) 编辑
摘要: import pytest @pytest.mark.parametrize('a,b,sum',[ # 参数化出来3组数据 (1,2,3), (2,3,5), (3,-19,-16) ]) def test_add(a,b,sum): assert a+b==sum # 如果 名称等于main 输 阅读全文
posted @ 2023-07-21 12:06 胖豆芽 阅读(7) 评论(0) 推荐(0) 编辑
摘要: import pytest @pytest.mark.parametrize('a,b,sum',[ # 参数化出来3组数据 (1,2,3), (2,3,5), (3,-19,-16) ]) def test_add(a,b,sum): assert a+b==sum # 如果 名称等于main 输 阅读全文
posted @ 2023-07-21 12:03 胖豆芽 阅读(10) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 65 下一页