Programering Python Syntax 1

The exercise was created 18.01.2021 by ville1111. Anzahl Fragen: 32.




Fragen wählen (32)

Normally, all words in an exercise is used when performing the test and playing the games. You can choose to include only a subset of the words. This setting affects both the regular test, the games, and the printable tests.

All None

  • datatype sequence list name=["abc", 123]
  • datatype mapping dictionary name={key:value}
  • datatype sequence tuple name=("abc", "123")
  • meddelande i terminalen print("abc")
  • operator addition +
  • operator subtraktion -
  • operator multiplikation *
  • operator division /
  • operator heltalsdivision //
  • operator modulus %
  • operator exponent **
  • x lika med x plus 1 x+=1
  • x lika med x - 2 x-=2
  • x lika med x gånger 3 x*=3
  • x lika med x dividerat med 2 x/= 2
  • x lika med heltalsdividerat med 2 x//=2
  • x lika med x med 2 som exponent x**=2
  • variable, input, meddelande variable=input("None")
  • datatype numeric 123 name=int(123)
  • datatype text abc name=str("abc")
  • datatype numeric 1.23 name=float(1.23)
  • datatype numeric (1, 2a) name=(real, imaginary) #complex
  • datatype boolean name=True #bool
  • datatype sequence numeric range name=range(start, end, step)
  • meddela vilken datatype är variable print(type(a))
  • define variable name=1
  • datatype any value set name={1, "abc", True} #set
  • datatype any value unchangeable frozenset name=frozenset(name) #frozenset
  • datatype bytes name=bytes(123) #bytes
  • datatype bytearray name=bytearray(123) #bytearray
  • datatype view unicode memoryview name=memoryview(b"abc") #memoryview
  • datatype print memoryview print(name[0])

All None

(
Freigegebene Übung

https://spellic.com/ger/abfrage/programering-python-syntax-1.10215495.html

)