zoukankan      html  css  js  c++  java
  • 7.31.... 简单的python代码

    # username = input('user:')
    # password = input('Passward:')

    # if username == 'admin' and password == '123':
    # print('login')
    # else:
    # print('Error.')

    # password = input('Password:')
    # A = 'QWERTYUIOPASDFGHJKLZXCVBNM'
    # B = 'zxcvbnmasdfghjklqwertyuiop'
    # C = '1234567890'

    # for i in passwoed:
    # if i in A and i in B and i in C:
    # pass
    # else:
    # print('必须含有大写小写数字')

    #分段函数↓
    # x = float(input('x:'))
    # if x > 1:
    # f = 3 * x - 5
    # elif x >= -1 and x <= 1 :
    # f = x + 2
    # else:
    # f = 5 * x + 3
    # print('f= %f'%f)
    # import numpy as np

    # yx = str(input('输入石头剪刀布:'))
    # res = np.random.choice(['石头','剪刀','布'])
    # if res == yx :
    # print('猜对了')
    # else:
    # print('猜错了,应该是 {}'.format(res))


    # import math
    # a = float(input('a = '))
    # b = float(input('b = '))
    # c = float(input('c = '))
    # if a + b > c and a + c > b and b + c > a:
    # l = a + b + c
    # print('周长为: %f' % (a + b + c))
    # p = (a + b + c) / 2
    # area = math.sqrt(p * (p - a) * (p - b) * (p - c))
    # print('面积为: %f' % (area))
    # else:
    # print('不是三角形')


    # mima = 100000
    # password = int(input('请输入你的密码'))
    # for i in range(3):

    # if password == mima:
    # print('对了')
    # break
    # else:
    # print('输入错误')
    # password = int(input('请输入你的密码'))
    # else:
    # print('账号锁定')

    # ini_password = 100000
    # input_ = int(input('请输入密码>>:'))
    # i=0
    # while i < 2:
    # i +=1
    # if input_ == ini_password:
    # print('ok')
    # break
    # else:
    # print('密码错误重新输入')
    # input_ = int(input('请输入密码>>:'))
    # else:
    # print('账号锁定')


    # m = int(input('m = '))
    # n = int(input('n = '))

    # fm = 1
    # while m != 1:
    # fm *= m
    # print(m)
    # m -= 1
    # print(fm)

  • 相关阅读:
    企业版证书打包APP发布,安装后闪退问题解决。
    Swift 与 Object-C 交互 (Swift版本为:1.2)
    iOS开发-代码片段(Code Snippets)提高开发效率
    iOS开发-Object-C可变参数函数
    MAC-Zsh安装与使用——终极Shell
    Git-学习笔记(常用命令集合)
    CSS动画,2D和3D模块
    CSS定位与布局
    CSS基础
    CSS概述
  • 原文地址:https://www.cnblogs.com/zwl123456/p/11285279.html
Copyright © 2011-2022 走看看