Study

Review: Python Basic

  •   0%
  •  0     0     0

  • A type of variable that handles two values only - True or False. 一种只处理两个值的变量 - True 或 False。
    bool or boolean
  • This symbol is used to take the remainder from the division operation. 该符号用于从除法运算中取余数。
    % Modulo operator
  • A type of variable that uses double quote symbols "". 一种使用双引号“”的变量。
    String
  • What is the output? 输出是什么?
    7.25
  • This function is used to display something on console. 此功能用于在控制台上显示某些内容。
    print()
  • What is the output? 输出是什么?
    7
  • A type of variable that stores up whole numbers. 一种存储整数的变量。
    int
  • A type of variable that uses numbers with decimal places. 一种处理带小数位的数字的变量。
    float
  • This symbol is used to combine or join two strings/variables together. 此符号用于将两个字符串/变量组合或连接在一起。
    +
  • It is a function that takes input from the user. 它是一个接受用户输入的函数。
    input()
  • Indentation in Python is very important (Yes/No). Python 中的缩进非常重要(是/否)。
    Yes
  • This symbol is used to perform exponentiation. 该符号用于执行幂运算。
    **
  • What is the output? 输出是什么?
    Error
  • It is a technique used to convert a data type to another data type. 它是一种用于将数据类型转换为另一种数据类型的技术。
    Casting
  • What is the output? 输出是什么?
    25.25
  • This function converts Numbers to String. 此函数将数字转换为字符串。
    str() or string function
  • This function converts String to Numbers. 此函数将字符串转换为数字。
    int() or Integer function or float function
  • This is used to store up data for later use. 这用于存储数据以备后用。
    Variables
  • It is the name of the variable which the user decides to choose. 它是用户决定选择的变量的名称。
    Identifier
  • What is the output? 输出是什么?
    SDPT5
  • Semicolon (;) is used to end the statement in Python (Yes/No). 分号 (;) 用于结束 Python 中的语句(是/否)
    No
  • This symbol is used to perform rounding off the value from division operation. 该符号用于对除法运算的值进行四舍五入。
    //