Hints and tips on completing simple programming tasks in Python.
- Getting started in Python - creating a new python file in repl.it
- Creating variables - defining variables of different data types and assigning values
- Outputting to the console - getting text to appear on the console
- Simple maths - performing addition, subtraction, multiplication and division
- Whole number division and remainders - Performing DIV and MOD
- Inputs from the console - allowing the user to inputs values during run-time
- Casting or converting data types - converting a value to a different data type (remember that if the value is not in the correct format, you will get an error)
- Joining strings together - concatenating string values together to make one big string
- Adding comments - everyones favourite activity
- IF statements - using IF (selection) to test for conditions to control the flow of the program
- ELIF - else if. Adding extra conditions
- Sleep - adding a pause in the run time of a program
- Random - generating random numbers
- FOR loop - creating and using a for loop (iteration)
- WHILE loop - creating and using a while loop (iteration) and infinite loops (forever!)
- Arrays or lists - spoiler... there are no arrays! Watch for how to make and use arrays (lists) in python
- More lists - how to do extra things with lists, including appending, sorting and popping!
- Complicated maths - not really, just maths in a loop. A walkthrough in how to create a binary convertor
- Subroutines - creating procedures and functions in python using def
- Useful function - using a function to convert a string of characters to binary values. Uses the ord() function to convert characters to character codes
- Character codes - converting character codes into characters using the chr() function. Useful for generating passwords
- String Manipulation - doing different snazzy features with strings
- Rock Paper Scissors - a guide to creating a version of rock, paper, scissors
- Adding files to repl - adding files to the project area (non code way)
- Basic reading from file - how to read the contents of a file
- Basic writing to file - using code to write text to file
- Reading lines from file - reading text from a file, one line at a time and using list with files
- Appending to a file - adding extra data to a file that already exists
- Comma separated values - reading and writing data in CSV format using files
- More to come... maybe...