Break your code apart Programming
Video: Break your code apart ProgrammingBreaking your code apart provides you with in-depth training on Developer. Taught by Simon Allardice as part of the Foundations of Programming: Fundamentals
- Where to go from here
Viewers: in countries Watching now:
Breaking your code apart provides you with in-depth training on Developer. Taught by Simon Allardice as part of the Foundations of Programming: Fundamentals
Finally, the course compares how code is written in several different languages, the libraries and frameworks that have grown around them, and the reasons to choose each one.
- Writing source code
- Understanding compiled and interpreted languages
- Requesting input
- Working with numbers, characters, strings, and operators
- Writing conditional code
- Making the code modular
- Writing loops
- Finding patterns in strings
- Working with arrays and collections
- Adopting a programming style
- Reading and writing to various locations
- Managing memory usage
- Learning about other languages
Breaking your code apart
After the name of the function, we need opening and closing parentheses. These say whether this function expects to have data passed into it which we'll get to later. In this case, empty parentheses means no, it doesn't. Now that we've created this function, we can call it. So somewhere else a little bit later in the program, I can use the name of the function followed by the empty parentheses and a semicolon.
So whether they use the term functions, modules, subroutines, methods, this idea of treating a block of code as a callable unit inside a larger program is a core feature of all programming languages. It makes your programs easier to write and easier to understand. You can split work among different programmers by giving them different parts to write. Now functions can of course get more complex than basic ones shown here. They might not just perform an operation, but they might return values or they might accept data, and we'll see how to do that next.
Find answers to the most frequently asked questions about Foundations of Programming: Fundamentals .
Here are the FAQs that matched your search "" :
- Q: Using TextEdit with Mac OS 10.9 Mavericks?
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.