Bertha02
Bertha02

性别: 注册于 2021-02-27

向TA求助
24金币数
190 经验值
0个粉丝
主页被访问 817 次

最近动态

2021-09-23 23:10 回答问题

def inputValue() -> 'all valid info':    while True:        try:            g = input('\nyour gender?\nenter \'m\' for male enter \'f\' for female: '.title())            if g.lower() not in ['m', 'f']:                raise ValueError            break 

2021-09-23 23:07 回答问题

首先,生成list import itertools list1 = list(itertools.permutati**((0,1,2,3,4,5,6,7,8,9),3))

2021-09-23 23:06 回答问题

可以编写出来吗?我试过用取余来判断,但是题中有加有减,后面有-(n-1)+n,感觉没有规律,是不是要用数学知识将这个算式分解,再考虑编程

2021-09-23 23:05 回答问题

前者是list,后者是tuple

2021-09-23 22:14 回答问题

谢谢老师的回复, 结果是正确的,  就是显示的格式希望所有的信息都在一张表格体现出来, 我下面这段代码得到的结果就是希望的结果,   但是是我拼凑起的,   应该代码可以再优化,  老师能否把我下面代码精简优化下,   df=pd.DataFrame({'型号':['A','A','A','A','B',],                     '规格':['H','H','H','H','H'],                      '版本':['T','T','K','K','K'],  

2021-09-23 21:30 回答问题

代碼:prefix = "https://book.douban.com/subject/"address = [2333637, 33409182, 3090244, 4819381, 1054592, 25848514, 2376727, 3069028, 1760297, 2081995, 21, 2278274, 2213619, 3365411, 2081994, 2174072, 3099292]url = [prefix+str(i) for i in address]for i in ur

2021-09-11 21:05 回答问题

第三题: class Singleton(object):   __instance = None   def __new__(cls, *args, **kwargs):     if cls.__instance == None:       cls.__instance = super(Singleton, cls).__new__(cls, *args, **kwargs)     return cls.__instance s1 = Singleton() s2 = Singleton() pr

2021-09-11 20:46 回答问题

我是把程序中的MOUSEMOTTON都改成了MOUSEMOTION

2021-08-07 15:47 回答问题

import os import time import ntplib import socket import subprocess count=0 while count==0: try:    c = ntplib.NTPClient()    response = c.request('pool.ntp.org') except socket.gaierror:    time.sleep(5)    print("网络不通\n")    continue except ntplib.NTP

2021-08-07 15:18 回答问题

我正在看笨办法学Python