More Strings.

Slides:



Advertisements
Similar presentations
Python - Selection Starter
Advertisements

Mathematical. Approach  Many of these problems read as brain teasers at first, but can be worked through in a logical way.  Just remember to rely on.
Lists Introduction to Computing Science and Programming I.
ICS 111 Midterm 1 Review. This class is ICS111 1.True 2.False.
Exponent Rules Repeated Multiplication Remember: so and.
EXAMPLE 4 Find the length of a hypotenuse using two methods SOLUTION Find the length of the hypotenuse of the right triangle. Method 1: Use a Pythagorean.
1-digit by 4-digit Multiplication
Quadratic Expressions and Equations Expanding quadratic expressions using the grid method (C)
8.3 Area of Squares and Rectangles
Multiplication methods. Multiplying  Multiplication is mainly taught in three ways - the grid method, Chinese multiplication and traditional column method.
Do it now activity Last term we learnt about how data is represented in a computer and about how to identify different volumes of data. How many bits in.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
Collecting Things Together - Lists 1. We’ve seen that Python can store things in memory and retrieve, using names. Sometime we want to store a bunch of.
Probability 2 Compound Probability.  Now lets consider the following:  2 dice are rolled and the numbers are added together.  What are the numbers.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #001 (January 17, 2015)
End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables.
Algebra Simplifying and collecting like terms. Before we get started! Believe it or not algebra is a fairly easy concept to deal with – you just need.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
By Eric Czerwinski Adding Multiplication Subtracting Dividing Math Questions 100 points100 Points100 points 300 points 400 points 300 points 400 points.
Adding a Sequence of numbers (Pairing Method)
If the same piece of code needs to be used several times we can use a loop – but only if those times are all together. If you need to run the same bit.
ORDER OF OPERATIONS Making Sense of Math.
Adding and Subtracting Fractions
Multiples and Factors.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
More Python Proglan Python Session 2. Lists  Lists are like flexible arrays. They can contain as many variables as you wish, and all variable types are.
5.5 Factoring Special Patterns 12/12/12. Perfect Squares
Solving Equations M7A2b Use the addition and multiplication properties of equality to solve one- and two-step linear equations.
COMPUTER PROGRAMMING Year 9 – Unit 9.04 Week 3. Open the Python INTERPRETER Can you use the interpreter to solve these maths problems? 156 add
CRE Programming Club Class 2 (Import JJZ543 and Practice Your Typing!)
Solving two step Inequalities < < < > < > <
Objective Standard 15.0 I can use the rules of exponents and factorization to simplify the multiplication and division of rational expressions.
Functions. functions: a collection of lines of code with a name that one can call. Functions can have inputs and outputs.
Repetition In today’s lesson we will look at: why you would want to repeat things in a program different ways of repeating things creating loops in Just.
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
Input, Output and Variables GCSE Computer Science – Python.
Integers Rules of Operation.
Here you can learn all about 2-D shapes
Learning the Multiplication Facts
Week 14 HCF, LCM, Standard Form
Exponent Rules
Multiplying 3 digits by 2 digits
File Handling Programming Guides.
You think you can just do your sums in any order you like. THINK AGAIN
Multiplication with Decimals
6-3 Solving Systems Using Elimination
Square Numbers and Square Roots
Teaching London Computing
Here you can learn all about 2-D shapes
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Repetition In today’s lesson we will look at:
The product of 3x5  2x4 is 6x20 6x9 5x20 5x9
What is x? x = 12 %
Introduction to Programming with Python
Beginning Python Programming
PYTHON LESSON 5 Mr. Kalmes.
Introductory Java Programming
Starter: There are 25 prime numbers under 100.
Magical Hexagons (Teachers notes):
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Python Inputs Mr. Husch.
What is the dimension of the matrix below?
Errors.
1-digit by 4-digit Multiplication
Python 4 and 5 Mr. Husch.
use your multiplication chart for help:)
Divisibility tests These are simple tricks to test what a number can be shared by . We are going to learn tricks for testing if a number can be shared.
Equivalent and Simplified Fractions
Computer Science Club 1st November 2019.
Presentation transcript:

More Strings

It’s because the multiplication bit (“llo It’s because the multiplication bit (“llo * 5) is done first, and then added to the string “He”.

Challenge Solution – print (“Fred “ *5) Can you remember how to get your program to print out your name 5 times? Get your program to print “Ha Ha Ho Ho” but you can only type the words once in the program Solution – print (Ha” *2 + “Ho “ * 2) Now add this line to the program & run it Print (“Hello” * 2 + 2) What Happens? 2Hello” is multiplied by 2 giving “HelloHello” 2. 2 is added to the string “HelloHello” Well that’s a problem. Step 2 does not make sense. You can’t add a number to a string, so you should remove it again. Sorry but it is useful to know what happens when a line of code has an error.

Challenge 2 Type the following code into python: Print (“**\n**”) You should see a 2 x 2, a 3x3 and a 4x4 grid of squares Write a program to print a triangle made up of stars Really advanced???? Can you print a Christmas tree? Solution – print (“*\n**\n***\n****”)