240 发简信
IP属地:新疆
  • # Create a program that asks the user for a number and then prints out a list of all the divisors of that number.
    # (If you don’t know what a divisor is, it is a number that divides evenly into another number.
    # For example, 13 is a divisor of 26 because 26 / 13 has no remainder.)
    num = int(input("please input a number"))
    divisors = [item for item in range(1, num+1) if num%item == 0]
    print(divisors)

    Python入门练习题 4/2 - 整除

    第4题:整除 难度系书:** 接受用户输入一个整数,列出能被该整数整除的所有数。 知识点 整除 期待你的答案 !!!

  • Python入门练习题 4/2 - 整除

    第4题:整除 难度系书:** 接受用户输入一个整数,列出能被该整数整除的所有数。 知识点 整除 期待你的答案 !!!

  • # Take a list, say for example this one:
    # a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
    # and write a program that prints out all the elements of the list that are less than 5.

    # Instead of printing the elements one by one, make a new list that has all the elements less than 5 from this list
    # in it and print out this new list
    a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]

    b = []
    for item in a:
    if item < 5:
    b.append(item)
    print(b)

    # Write this in one line of Python.
    print([item for item in a if item < 5])

    # Ask the user for a number and return a list that contains only elements from
    # the original list a that are smaller than that number given by the user.
    num = int(input("please input a number"))
    print([item for item in a if item < num])

    Python入门练习题 4/1 - 数组循环,逻辑判断

    第3题:数组循环,逻辑判断 难度系书:* 给定一个python list :a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89], 求所有小...

  • Python入门练习题 4/1 - 数组循环,逻辑判断

    第3题:数组循环,逻辑判断 难度系书:* 给定一个python list :a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89], 求所有小...

  • 没人来玩,自问自答吧。

    # Create a program that asks the user to enter their name and their age.
    # Print out a message addressed to them that tells them the year that they will turn 100 years old.
    name = input("What is your name : ")
    str_age = input("what is your age : ")
    age = int(str_age)
    year = 2018 + 100 - age
    print(name + "will be 100 years old at "+str(year))

    Python入门练习题 3/30 - 字符串输入

    从今天开始,打算把自己以前学python做的一些练习题分享给大家,隔天公布答案,并且就里面的解法我们可以一起探讨,欢迎大家多多参与。 第1题:字符输入 难度系书:* 创建一...

  • @IT人故事会 谢谢,相互学习

    Python入门练习题 3/30 - 字符串输入

    从今天开始,打算把自己以前学python做的一些练习题分享给大家,隔天公布答案,并且就里面的解法我们可以一起探讨,欢迎大家多多参与。 第1题:字符输入 难度系书:* 创建一...

  • Python入门练习题 3/30 - 字符串输入

    从今天开始,打算把自己以前学python做的一些练习题分享给大家,隔天公布答案,并且就里面的解法我们可以一起探讨,欢迎大家多多参与。 第1题:字符输入 难度系书:* 创建一...

  • 120
    苹果是如何让 Siri 落后于谷歌助手和 Alexa 的?

    简评:Siri 推出七年了,仍然不是那么聪明。Siri 如此弱,有公司内部管理的问题;有技术团队之间互相推诿的问题;也有苹果压根不重视的缘故。 多年来,苹果一直在大幅改进 S...

  • www.bknews.site - 保险科技头条

    自己玩的个人站点,基本想法是分享一些关于保险科技(InsurTech)新闻。很有觉得有必要做得更好一点,但是由于自己懒,已经闲置了大半年了。数据爬虫,分类,公众号等等一系列事...

  • 120
    《逆向管理》- 读书笔记

    确切的说这本书是2017年经朋友推荐看的,对我的启发很大。 书中一针见血的指出在领导力转变的过程中,你需要先行动再思考,并且在行动过程中不断调整自己 下面是自己整理的思维导图...