¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

Programming Flashcards

Vera Wu Computer Science Inglés 17 fichas

Fichas del conjunto (17)

  1. 1operators are:+ addition
    - subtraction
    * multiplication
    / division
    // integer division
    ** power
    % modulo
  2. 2Basic calculationsprint( 15+4 )
    print( 15-4 )
    print( 15*4 )
    print( 15/4 )
    print( 15//4 )
    print( 1 5* *4 )
    print( 15%4 )
  3. 3The modulo operator (%)takes the remainder of a division
  4. 4a statementexample: print( 15+4 )
  5. 5Strings"A string is a text, consisting of zero or more characters."
    fix error: 'I can\'t stand it'
  6. 6Data Typesstring""
    Integer (whole number)
    Float ( a number with a decimal point.)
  7. 7An expressioncombination of one or more values (such as strings, integers, or floats) using operators,
    which result in a new value
  8. 8String expressionsprint( "hello"+"world" )
    print( 3* "hello" )
    print( "goodbye" *3 )
  9. 9Type castingchange the data type of a value into a different data type.
  10. 10The three main type casting functions• int() will return the value between the parentheses as an integer (rounding down if
    necessary)
    • float() will return the value as a float (adding .0 if necessary)
    • str() will return the value as a string
  11. 11Variable name rules:1.Must start with a letter or underscore_
    2.Consist of Letters, Digits or Underscores
    3.Cannot be a reserved word
  12. 12Programmer Conventions*Choose variable meaningful to code
    *Only use lowercase letters (avoid confusion)
    *put underscore between words
    *don't choose names that start with underscore.
  13. 13constantsvalues assigned to a variable which can no longer be changed after the value has been first assigned.
  14. 14Boolean ValuesTrue and False
  15. 15False ValuesFalse
    0 numerical values
    "none"
    ("empty string")
  16. 16Comparisons==
  17. 17in operatortests if the value to the
    left side of the operator is found in a “collection” to the right side of the operator.

Información

Descripción
Computer Science Fichas sobre Programming Flashcards, creado por Vera Wu el 19/09/2019.
Creado por
Vera Wu
Visitas
5
Historial
  • Creado por Vera Wu · 19 sep 2019
  • Copiado por Vera Wu · 19 sep 2019
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?