Avsnitt 2. Kapitel 1
ninja.py
index.html
preset.py
Using Functions
Svep för att visa menyn
Why Use Functions?
Repeating code makes programs long and hard to maintain. Functions let you group commands into a reusable block, reducing repetition and making your code cleaner.
To call a function, simply use its name followed by parentheses, placing any required arguments inside those parentheses. For example, if you have a function named greet that takes a name of a person to greet, here is how you could call it:
greet("Alice")
Uppgift
Swipe to start coding
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 2. Kapitel 1
ninja.py
index.html
preset.py
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal