新手入门Python,记录一下自己写的代码,有问题和想法的友友们可以在评论区交流

'''money=1000
s=int(input('请输入取款金额(整数):'))
if money>=s:
    money-=s
    print('取款成功,余额为:',money)
else:
    print('余额不足,取款失败')'''
#判断是奇数还是偶数
'''num=int(input('请输入一个整数:'))
if num%2:
    print(num,'is an odd')
else:
    print(num,'is an even')'''
#Multi-branch score judgment
'''score=int(input('input your score:'))
if score>=90 and score<=100:
    print('your score is level A')
elif score>=80 and score<90:
    print('your score is level B')
elif score >= 70 and score < 80:
    print('your score is level C')
elif score>=60 and score<70:
    print('your score is level D')
elif score >= 0 and score < 60:
        print('your score is level E')
else:
    print('score is invalid')'''
#shopping amount judgment
answer=input('are you a VIP?y,Y/n,N')
if answer=='y' or answer=='Y':
    amount=float(input('input your shopping amount:'))
    if amount>=200:
        print('20% off,the payment is:',amount*0.8)
    elif amount>=100:
        print('10% off,the payment is:',amount*0.9)
    else:
        print('NO discount,the payment is:',amount)
else:
    amount = float(input('input your shopping amount:'))
    if amount>=200:
        print('5% off,the payment is:',amount*0.95)
    else:
        print('NO discount,the payment is:',amount)

另外:建议大家写代码都用英文。

我最近入手的方向是opencv图像处理,模式识别,希望有这方面的大佬多多指点。

我的主要学习资源来自B站

下面是链接

【花了2万多买的Python教程全套,现在分享给大家,入门到精通(Python全栈开发教程)】 https://www.bilibili.com/video/BV1wD4y1o7AS/?p=44&share_source=copy_web&vd_source=d72490d9fdaa25a931b4485c6317ef86

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值