In the book Python Crash Course I learned how to use functions in Python and implement them into lists. It explains this on page 134, "When you want to perform a particular task that you've defined in a function you call the name of the function responsible for it." (Matthes 134). This taught me how to use functions in Python which simplifies my code to be more clean.
I also learned how to format my text with functions. This is explained on page 141, Functions can store values and format them to be more neat (Matthes 141). This taught me how to change format values I already have with a function which diversifies what I can do in Python.
How would you create your lists in Python?
Sunday, January 29, 2017
Lists Done With Functions in Python
Lists Done With a While Loop in Python
In the book Python Crash Course I learned how to use while loops in Python and apply it to lists. It explains what while loops are on page 122 it says, A while loop is a loop that runs as long as a value set in the loop is true. (Matthes 122). This taught me how to easily implement while loops into my code which helps me learn more of what I can do in Python.
I also learned how to stop a while loop before its condition is false. This is explained on page 125, "To exit a while loop immediately without running any remaining code in the loop, regardless of the results of any conditional test, use the break statement" (Matthes 125). This taught me how to implement a statement that can stop the loop which helps me improve at programming in the Python language.
What other programming language should I learn about?
Matthes, Eric. Python Crash Course: A Hands-on, Project-based Introduction to Programming. San Francisco: No Starch Press, 2016. Print.
List Done With a Dictionary in Python
In the book Python Crash Course I learned how to use dictionaries in Python and apply it to lists. It explains this on page 96, Dictionaries are a collection of pairs, the first part of the pair is a name while the second part is the value the name is associated with (Matthes 96). This taught me how to utilize other methods to create lists which helps me diversify how I program in Python.
I also learned how to add new pairs to dictionaries after making it. It also explains this on page 97, "To add a new key-value pair, you would give the name of the dictionary followed by the new key in square brackets along with the new value" (Matthes 97). This taught me how to improve upon dictionaries which helps me improve at programming in Python.
What program should I do next in Python?
Matthes, Eric. Python Crash Course: A Hands-on, Project-based Introduction to Programming. San Francisco: No Starch Press, 2016. Print.
Saturday, December 31, 2016
More in Depth Lists in Python
I learned how to develop my lists even more and make them more in depth. In the book Python Crash Course it showed me how to use if statements, on page 76 it said, You can change specific elements by using an if statement. (Matthes 76). This taught me how to change specific elements in a list to be more in depth and precise which leads to me being better at programming in the Python language.
Another thing the book showed me how to do was display user input, on page 118 it said, "The input() function pauses your program and waits for the user to enter some text. Once Python receives the user's input, it stores it in a variable to make it convenient for you to work with." (Matthes 118). This taught me how to implement code that can interact with the user which helps me become better at programming in the Python language because interactive programs are very useful.
What types of programs do you think are most useful?
Matthes, Eric. Python Crash Course: A Hands-on, Project-based Introduction to Programming. San Francisco: No Starch Press, 2016. Print.
Wednesday, November 30, 2016
Lists in Python
Matthes, Eric. Python crash course: a hands-on, project-based introduction to programming. San Francisco: No Starch Press, 2016. Print.
I learned how to make lists in Python and display them in multiple ways. In the book Python Crash Course it showed me how to reverse lists, on page 49 it said, You can reverse lists by using the name that defines a list and adding .reverse() to it. After that line you type print(name) and it will be printed in reverse. (Matthes 49). This taught me how to implement reversed lists into my code which helps me improve at programming in the Python language. Another thing the book showed me how to do was separate list items, on page 38 it said, "Write the name of the list followed by the index of the item enclosed in square brackets." (Matthes 38). This taught me how to implement a list into my code that looks more professional when printed which helps me improve at programming in the Python language.
What do you think the most important programming language is?