Study material generic cover image

Summary Programmeren

117 Flashcards & Notes
Scroll down to see the PDF preview!
  • This summary
  • +380.000 other summaries
  • A unique study tool
  • A rehearsal system for this summary
  • Studycoaching with videos
Remember faster, study better. Scientifically proven.
Trustpilot Logo

A snapshot of the summary - Programmeren

  • 1.1 Printing text

  • What does the print() function do?
    It prints whatever is between the round brackets
  • Because Hello is a word, a piece of text, it needs to be.......
    Enclosed in quotation marks --> ' '
  • Printing in Python can be done with print and round brackets () and single quotes (' '). But, it can also be done with?
    Double quotes ( "  " )
  • How can you print multiple lines in python?
    • With the \n character (no spaces before or after the character)
    • Triple quotes (" " ")

  • What is the difference between printing text and printing numbers? Numbers are printed like this: print(5), while text...
    Can be printed between singles or double quotes.

    print('Correct!')
    print("Correct!")
  • 1.2 About Assignments

  • Why do we want store values before printing?
    Because the same piece of information is present in printed text multiple times.
  • How do we call text in programming?
    Strings
  • What is the difference between a triple quoted string and a single or double quoted one?
    Triple quotes strings may contain newlines
  • How do you use a f-string?
    You need to place the letter f before a string, than use the variable inside it. Like this:  

    f"Hello {name}"
  • How is a variable called when it remains the same in an entire program?
    It has to role as        fixed value
Read the full summary
This summary. +380.000 other summaries. A unique study tool. A rehearsal system for this summary. Studycoaching with videos.