• Skip to primary navigation
  • Skip to content
  • Skip to footer
Fundamentals of Computing Course Notes Fundamentals of Computing Course Notes UMD Summer II ENAE202
  • General
  • MATLAB
  • Python
  • C++
  • About
    • Home
    • Getting Started
    • User Interface
    • Week 1
      • Variables & Output
      • Input & Data Types
      • Using Libraries
      • Conditionals
      • For Loops
      • While Loops
    • Week 2
      • User-Defined Functions
      • Lists & Tuples
      • List Comprehensions
      • NumPy Arrays
      • Plotting with Matplotlib
      • File Input/Output
    • Week 3
      • Dictionaries
      • Lists of Dictionaries
      • Classes & Objects
      • Class Variables, Methods & Objects
      • Type Hints & Dataclasses
    • List of Examples
    • Sandbox Pages

    Defining a Function

    def greet():
        print("Hello from a function!")
    
    greet()
    
    
    Hello from a function!
    
    
    • Canvas
    • GitHub
    © 2026 Kenneth (Kip) Hart.