This file consists of
- This is a python calculator that calculates your BMI
Python skills
- Python input function
- Variables
- Python math commands such as / for division, ** is used to raise the number on the left to the power of the exponent of the right
- Print formatting
- This small project uses string slicing to reverse print every 2nd letter of an input given by the user
Python skills
- Python input function
- Variable
- Python reverse string
- This program asks the user to input any positive integer and outputs the successive values of the following calculation. At each step calculate the next value by taking the current value and, if it is even, divide it by two, but if it is odd, multiply it by three and add one. Have the program end if the current value is one.
Python skills
- Python input function
- Python comparitor functions, such as != meaning not equal to
- Python modulus, % 2 == 0: checks to see if number is even
- Python while loop
- Python if statement
- Python error handling
- weekday.py is a program that outputs whether or not today is a weekday.
Python skills
- Use of Python datetime module
- Use of Python dictionary
- Using Python to calculate squareroot
Python skills
- I originally used Python math module for inbuilt squareroot function
- Python input function
- Python math commands
- Try / Except , Exception handling
- This is a program that reads in a text file and outputs the number of e's it contains. The program should take the filename from an argument on the command line. e.g. $ python es.py moby-dick.txt
Python skills
- sys.argv to give commands from the command prompt
- use of os module to get current working directory
- variables
- count function
- f(x)=x, g(x)=x2 and h(x)=x3 in the range [0, 4]
Python skills
- use of modules
- matplotlib
- numpy
- random