zoukankan      html  css  js  c++  java
  • python学习随笔day1

    自学python一两个月,感觉太零散了,最初学习目的是爬虫,学着学着数据分析、opencv识别等等,结果感觉什么都没学上。

    现在决定重新从基础一步步学习

    学习笔记(1)简单登录

    #_*_coding:utf-8*_
    #Author:Andy

    #登录接口
    username="abc"
    password="123"



    count1 = 0
    while True:
    if count1 ==3:
    print("while :连续猜错3次,自动退出。")
    break
    guess_username= input('username:')
    guess_password = input('password:')


    if guess_username != username:
    print("帐号错误")
    elif guess_password != str(password):
    print("密码错误")
    else:
    print("登录成功")
    count1 = count1+1
    if count1==3:
    continue_confirm = input("请确认继续guess:y/n")
    if continue_confirm != 'n':
    count1=0;


    学习笔记(2)多菜单 -验证码登录

    count2 = 0
    while True:
    if count2 ==3:
    print("homework:连续猜错3次,自动退出。")
    break
    guess_username= input('username:')
    guess_password = input('password:')
    guess_code=input("code:")

    if guess_username != username:
    print("帐号错误")
    elif guess_password != str(password):
    print("密码错误")
    elif guess_code != code:
    print("验证码错误")
    else:
    print("登录成功")
    break
    count2 = count2+1
    if count2==3:
    continue_confirm = input("请确认继续guess:y/n")
    if continue_confirm != 'n':
    count2=0;
  • 相关阅读:
    springboot springdata 整合es
    forkJoinPool
    springboot整合ElasticSearch
    雪花算法生成全局唯一ID
    linux环境下elasticsearch+kibana+ik(实现热词自动更新)
    ECMAScript 6新特性简记
    Tsung:开源多协议分布式负载&压力测试工具
    js 数组迭代方法总结
    js for循环
    箭头函数this的问题
  • 原文地址:https://www.cnblogs.com/wede375/p/8302953.html
Copyright © 2011-2022 走看看