Second task of the week was not too challenging, it was just making sure I had the right maths work and making sure I remembered to change the variable to a integer. The program needed to print the multiplication of an input up to 12 e.g. 1x2 2x2 3x3 etc. This meant I had to loop it but make it stop at 12. For this grok used range which let you put a break/ limit on how many times it loops before stopping. The range function goes with the for in.
Multiplication Drill
Second task of the week was not too challenging, it was just making sure I had the right maths work and making sure I remembered to change the variable to a integer. The program needed to print the multiplication of an input up to 12 e.g. 1x2 2x2 3x3 etc. This meant I had to loop it but make it stop at 12. For this grok used range which let you put a break/ limit on how many times it loops before stopping. The range function goes with the for in.
No comments:
Post a Comment