Python: Study Guide Review + Project 5 question

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 1

  • @KalebCarter-n7n
    @KalebCarter-n7n 5 дней назад

    What does the return statement do in Python?
    -returns a value from a function to the function call
    What are the three parameters of the range() function?
    -start, stop, step
    What is the difference between local and global variables?
    -Local variables are used only inside functions, while global variables are used throughout the entire script. In functions, the 'global' keyword should be used to allow global variables to be applied in them.
    How can you add an item to a list in Python?
    -list.append(value)
    How do you access an element in a list?
    -list[index of element in list]