zoukankan      html  css  js  c++  java
  • 代码

    # 列表转集合(去重)
    #list1 = [6, 7, 7, 8, 8, 9]
    #print(set(list1))

    # {6, 7, 8, 9}

    #list = ['豆浆',2,'面包',6,3,2,1,5]
    #list[5]=10
    #print(li

    #print(list(range(20))[1:20:2])

    #a = []
    #a.insert(0,0)
    #print(a)
    #a.append(1)
    #print(a)
    #a.extend([2,3])
    #print(a)
    #a.remove(1)
    ##print(a)
    #del a[1]
    #print(a)
    #a.pop(1)
    ##print(a)
    #a.clear()
    #print(a)


    #lst = [3,3,1,1,0,7]
    #lst_set = set(lst)
    #tup = (2,2,1,7,9,9,9)
    #tup_set = set(tup)
    #for item1 in lst_set:
    # print(item1)
    #for item2 in tup_set:
    # print(item2,end = '')


    #dict = {0:["a"]}
    #dict.setdefault(1,["a"])
    #dict[True] = ["b"]
    #dict[2.5] = ("c",)
    #dict.setdefault("d")
    #print(dict)
    #dict.pop("d")
    #dict.popitem()
    #print(dict)
    #dict.clear()
    #print(dict)

    #条件循环语句
    #flag = False
    #name = 'python'
    #if name == 'python':
    # flag = True
    # print('welcome boss')
    #else:
    # print(name)

    #num = 5
    #if num == 3:
    # print('boss')
    #elif num == 2:
    # print('worker')
    #elif num ==1:
    # print('user')
    #elif num


    #num = 9
    #if num >=0 and num <=10:
    # print('hello')
    #else:
    # print('underfine')
    #age = int(input("请输入您家狗狗的年龄"))
    #if age <= 0:
    # print("你是在逗我吧")
    #elif age == 1:
    # print("14")
    #elif age ==2:
    # print("22")
    #elif age > 2:
    # human = 22 + (age-2)*5
    # print("对应人的年龄",human)

    #list_=[2]
    #n = 3
    #while n <= 1000:
    # c = True
    # a = 2
    # while (a < n and c==True):
    # b= n % a
    # if (b==0):
    # c = False
    # else:
    # a = a+1
    # if c == True:
    # list_.append(n)
    # n = n+1
    #print(list_)

    #n=int(input("输入")) #输入n
    #Fib(n)=Fib(n-1)+Fib(n-2) #fn等于这玩意
    #def Fib(n):
    # if n == 1: #如果输入1或2回1
    # return 1
    # elif n ==2:
    # return 1
    # else:
    # return Fib(n-1)+Fib(n-2) #其他的回这一坨
    #print(Fib(n)) #打印

    #def fib_recur(n):
    # assert n >= 0, "n > 0"
    # if n <= 1:
    # return n
    # return fib_recur(n-1) + fib_recur(n-2)

    #for i in range(1, 20):
    # print(fib_recur(i), end=' ')

    #斐波那契数列
    #def f(n):
    # if n == 1:
    # return 1
    # elif n == 2:
    # return 2
    # else:
    # return f(n-1)+f(n-2)
    #
    #for i in range(1,10):
    # print(f(i))

    #进制转化:
    #newBase=eval(input("Enter the new base:"))
    #decimalNumber=eval (input("Enter the number to be converted"))
    #quotient=1
    #answer=''
    #he={'10':'A'}
    #while quotient !=0:
    # quotient=decimalNumber//newBase
    # remainder=str(decimalNumber%newBase)
    ## if remainder in he:
    # remainder=he[remainder]
    # answer=remainder+answer
    # decimalNumber=quotient
    #print("The answer is:",answer)

    #三目运算符比较五个数字的大小
    #a = int(input("请输入a:"))
    #b = int(input("请输入b:"))
    #c = int(input("请输入c:"))
    #d = int(input("请输入d:"))
    #e = int(input("请输入d:"))
    #m = (a if a>b else b)
    #n = (m if m>c else c)
    #o = (n if n>d else d)
    #p = (o if o>e else e)
    #print(p)
    #print("20201215王馨瑶")

    #def pattern(n):
    # if n == 0:
    # print(0,end=' ')
    # else:
    # pattern(n-1)
    # print(n,end=' ')
    # pattern(n-1)
    #p#rint(pattern(15%6b))

    #a = {'color':'green','point':5,1:'qwer'}
    # 访问字典的值
    #print(a['color'])
    #print(a['point'])
    #print(a[1])
    ##添加键-值对
    #a['x'] = 0
    #a['y'] = 25
    #print(a)
    3#修改值
    #a['color'] = 'red'
    #a[1] = 'asdf'
    #print(a)
    ##删除
    #del a['x']
    #del a['y']
    #print(a)

    #love = {'jen':'python','c':'d'}
    #for name,language in love.items():
    # print('name ' +name.title(),'lau'+language.title())

    # def complete (abbreviation):
    # '返回星期名缩写对应的星期名称'
    # days = {'Mo':'Monday','TU':'Tuesday','We':'Wednesday','Th':'Thursday','Fr':'Friday','Sa':'Saturday','Su':'Sunday'}
    #
    # return days[abbreviation]

    a = eval(input('your num '))
    a=a%7
    s=['monday','tuesday','wednsday','thursday','friday','saturday','Sunday']
    b=s[a]
    print(b)























  • 相关阅读:
    Java内存回收
    Android四大基本组件介绍与生命周期
    JAVA中获取当前系统时间
    jquery如何判断元素是否被点击_百度知道
    css控制div显示/隐藏方法及2种方法比较原码
    点击图标不断震动效果
    jquery 如何动态添加、删除class样式方法介绍_jquery_脚本之家
    HTML5绘制矩形和圆形并且还有获取在这个图层内的坐标的思路和代码
    Attribute name invalid for tag form according to TLD异常解决办法_gaigai_百度空间
    html5绘图
  • 原文地址:https://www.cnblogs.com/hahahahahahahaij/p/14020987.html
Copyright © 2011-2022 走看看