SDD

    Cards (57)

    • What is Python?

      Python is a high-level programming language used to develop software.
    • When was Python first released?

      Python was first released in 1991.
    • What are the advantages of using Python?

      • Free to download
      • Easy to install
      • Works on almost every computer
      • Comes preinstalled in all Raspberry Pi’s
      • Extremely readable with enforced indentation
      • Uses less code than other languages
      • Vast number of useful libraries
      • Useful error messages
    • What programming paradigms can Python be used for?
      • Object-Oriented programming
      • Imperative programming
      • Scripting language
      • Functional programming
      • Procedural programming
      • Event-driven programming
    • What is Python IDLE?

      Python IDLE stands for Integrated Development and Learning Environment.
    • What features does Python IDLE include?

      • Multi-window text editor
      • Syntax highlighting
      • Auto-completion
      • Smart indent
      • Integrated debugger
    • How do you create a new program in Python IDLE?

      Select "New File" from the "File" menu or use the shortcut Ctrl+N.
    • What file extension should all Python programs have?

      All Python programs should end in ".py".
    • Why is it important to give meaningful names to Python programs?

      Meaningful names help identify the function of the program in the future.
    • What is the purpose of adding comments in Python code?

      • Improve readability of the code
      • Explain what the program is doing
      • Highlight important sections
      • Remind the programmer of how their code works
    • How do you start a multi-line comment in Python?

      A multi-line comment starts with three quotation marks (""").
    • How do you add a single line comment in Python?

      A single line comment is added using a hash (#) symbol.
    • What are the rules for naming variables in Python?

      • Must begin with a letter or underscore
      • Can include letters, numbers, or underscores
      • Case sensitive
      • Can be any reasonable length
      • Cannot use reserved words
    • What is a variable in Python?

      A variable is a storage location in memory that can store a value used within a program.
    • What are the five variable types you need to know for National 4/5 Computing Science?
      • Integer
      • Float
      • Char
      • String
      • Boolean
    • What is the purpose of type casting in Python?

      Type casting is used to change the data type of a variable throughout a program.
    • What is input validation in programming?

      • Checks if user input is of the correct type
      • Ensures input is within the correct range
      • Uses Boolean, WHILE loops, and IF statements
    • What is the purpose of arrays in Python?

      • Store multiple pieces of data in a single data structure
      • Must contain the same data type
      • Each piece of data is identified by an index starting at zero
    • What is the index in an array?

      The index is a number that uniquely identifies each piece of information in an array.
    • What is the Fibonacci sequence?

      • A sequence of numbers where each number is the sum of the two preceding ones
      • Starts with 0 and 1
      • Example: 0, 1, 1, 2, 3, 5, ...
    • What is the purpose of the "valid age.py" program?

      It checks if the entered age is valid (between 0 and 120).
    • What should the program "valid password.py" do?

      It should ask for a password and display a message based on the correctness of the input.
    • What is the task of the program "valid year.py"?

      It should ask the user for their name and their current year in high school.
    • What is the significance of the phrase "Garbage in: Garbage out!" in programming?

      • Highlights the importance of input validation
      • Indicates that incorrect input leads to incorrect output
    • What are nested loops used for in programming?

      • To iterate over multiple dimensions of data
      • To perform repetitive tasks within repetitive tasks
    • What is the task of the program "total calories.py"?

      It asks pupils to enter how many calories they had for each meal and totals them up.
    • What is the task of the program "nested numbers.py"?

      It displays a specific pattern using nested loops.
    • What is the task of the program that displays the 2 times table?

      It uses nested loops to display the 2 times table.
    • What is the name of the program that asks the user for their name and year of High School?

      valid year.py
    • What years of High School does the program accept as valid input?
      1st, 2nd, 3rd, 4th, 5th, and 6th
    • What is the name of the program that tracks calories for five pupils?

      total calories.py
    • What is the purpose of the nested loops in the calorie tracking program?

      • Ask each pupil for calories consumed at breakfast, lunch, and dinner
      • Total the calories for the day
      • Display the results
    • What is the name of the program that displays a nested loop of numbers?

      nested numbers.py
    • What is the name of the program that displays the 2 times table using nested loops?

      two times table.py
    • How many times does the example loop display "Hello" and what is the final value of the counter?

      10 times, counter value is 9
    • How can the user specify how many times the code loops in the example provided?

      By inputting a number when prompted
    • What is the name of the program that asks the user how many times to display their name?

      looped name.py
    • What is the name of the program that displays numbers 1-20 using a fixed loop?

      number line loop.py
    • What is the name of the program that displays the products of the 2 times table up to 40?

      times table loop.py
    • What is the name of the program that displays negative numbers using a fixed loop?

      negative number loop.py
    See similar decks