暗記メーカー
ログイン
Prelim Exam (Lecture)
  • David Mirano

  • 問題数 71 • 9/29/2024

    記憶度

    完璧

    10

    覚えた

    27

    うろ覚え

    0

    苦手

    0

    未解答

    0

    アカウント登録して、解答結果を保存しよう

    問題一覧

  • 1

    High-level, interpreted programming language

    python

  • 2

    Python is created by

    guido vann rossum

  • 3

    Python is created on year

    1991

  • 4

    Known for its simplicity and readability

    python

  • 5

    Widely used in AI, ML, web development, automation, and more

    python

  • 6

    Python has a simple syntax similar to the _____.

    english language

  • 7

    Python can connect to ____. It can also read and modify files.

    database systems

  • 8

    Python can be used to handle ___ and perform complex mathematics.

    big data

  • 9

    Python can be used to handle big data and perform ____

    complex mathematics

  • 10

    Python can be used for ____, or for production-ready software development

    rapid prototyping

  • 11

    Python has syntax that allows developers to write programs with ____ than some other programming languages. (Interoperability with other languages/tools)

    fewer lines

  • 12

    Python runs on an ____, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.

    interpreter system

  • 13

    Python runs on an interpreter system, meaning that code can be executed as soon as it is ___. This means that prototyping can be very quick.

    written

  • 14

    Python uses ___ to complete a command, as opposed to other programming languages which often use semicolons or parentheses.

    new lines

  • 15

    Python relies on ____, using whitespace, to define scope;

    indentation

  • 16

    Python relies on indentation, using ____, to define scope;

    whitespace

  • 17

    Why Python for AI and ML?

    simplicity and readability, extensive libraries, active community support, platform independence, integration capabilities

  • 18

    Extensive libraries: Pre-built libraries like

    pandas, numpy, keras, tensorflow, scikit-learn

  • 19

    Variables and data types:

    strings, integers, booleans, floats

  • 20

    Python uses ____ (not braces {}) to define code blocks

    indentation

  • 21

    Use # before the comment text

    single-line comments

  • 22

    Use triple quotes (''' or """)

    multi-line comments

  • 23

    Comments help explain code and improve readability

    purpose

  • 24

    Basic data types

    strings, numbers, booleans

  • 25

    Collections:

    lists, tuples, dictionaries, sets

  • 26

    Conditional statements

    if, elif, else

  • 27

    Loops

    while loops, for loops

  • 28

    Use the print() function to display text or variable values

    output

  • 29

    Use input() function to capture user input

    input

  • 30

    If you have a collection of values in a list, tuple etc. Python allows you to extract the values into variables. This is called ____

    unpacking

  • 31

    You can get the data type of any object by using the___ function

    type()

  • 32

    In ____, a data type is converted into another data type by the programmer using the casting operator during the program design

    type casting

  • 33

    In _____ , a data type is automatically converted into another data type by a compiler at the compiler time.

    type conversion

  • 34

    Equals symbol

    a == b

  • 35

    Not equals to symbol

    a != b

  • 36

    Less than symbol

    a < b

  • 37

    Less than or equals to

    a <= b

  • 38

    Greater than symbol

    a > b

  • 39

    Greater than or equals to

    a >= b

  • 40

    An "__ statement" is written by using the if keyword.

    if

  • 41

    • Python relies on ___ (whitespace at the beginning of a line) to define scope in the code. Other programming languages often use curly-brackets for this purpose

    indentation

  • 42

    The ___ keyword is Python's way of saying "if the previous conditions were not true, then try this condition

    elif

  • 43

    The ___ keyword catches anything which isn't caught by the preceding conditions.

    else

  • 44

    If you have only one statement to execute, you can put it on the same line as the if statement

    shorthand if

  • 45

    Python has two primitive loop commands:

    while loops, for loops

  • 46

    With the ___ we can execute a set of statements as long as a condition is true

    while loop

  • 47

    With the ___ statement we can stop the loop even if the while condition is true:

    break

  • 48

    With the ___ statement we can stop the current iteration, and continue with the next

    continue

  • 49

    With the ___ statement we can run a block of code once when the condition no longer is true

    else

  • 50

    A ___ is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string

    for loop

  • 51

    The ___ function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number

    range()

  • 52

    The ___ block will NOT be executed if the loop is stopped by a break statement.

    else

  • 53

    A ___ is a loop inside a loop. The "inner loop" will be executed one time for each iteration of the "outer loop”

    nested loop

  • 54

    for loops cannot be empty, but if you for some reason have a for loop with no content, put in the ___ statement to avoid getting an error

    pass

  • 55

    A ___ is a block of code which only runs when it is called.

    function

  • 56

    You can pass data, known as ___, into a function

    parameters

  • 57

    A ___ can return data as a result.

    function

  • 58

    In Python a function is defined using the ___ keyword

    def

  • 59

    Information can be passed into functions as ____.

    arguments

  • 60

    ___ are specified after the function name, inside the parentheses.

    arguments

  • 61

    Arguments are often shortened to ___ in Python documentations

    args

  • 62

    The terms ___ and __ can be used for the same thing: information that are passed into a function

    arguments, parameters

  • 63

    You can also send arguments with the ____ syntax. This way the order of the arguments does not matter.

    key=value

  • 64

    If you do not know how many keyword arguments that will be passed into your function, add two asterisk: ** before the parameter name in the function definition. This way the function will receive a ___ of arguments, and can access the items accordingly

    dictionary

  • 65

    To let a function return a value, use the ___ statement:

    return

  • 66

    You can specify that a function can have ____, or ____

    only keywords arguments, only positional arguments

  • 67

    To specify that a function can have only keyword arguments, add ___, before the arguments

    *

  • 68

    Any argument before the __, , are positional-only, and any argument after the *, are keyword-only

    /

  • 69

    ___ is an important part of any web application.

    file handling

  • 70

    You can return one line by using the ___ method:

    readline()

  • 71

    By default the ___ method returns the whole text, but you can also specify how many characters you want to return

    return()