Challenge #1: Hello World! Write a program that displays the message “Hello World!” Change your program so that it asks for the end-user to type their firstname. (e.g. “John”) The program should then display “Hello John!” Challenge #2: My Name…
Challenge #1: Hello World! Write a program that displays the message “Hello World!” Change your program so that it asks for the end-user to type their firstname. (e.g. “John”) The program should then display “Hello John!” Challenge #2: My Name…
Learning objectives In this challenge we will use string manipulation techniques to manipulate text data. In Python a String is a piece of text. It can contain letters, numbers and punctuation signs. Hello my name is Bond, James Bond Look…
Looking at the following code can you explain the purpose of each Python Turtle instructions: myPen.color(“red”) myPen.forward(100) myPen.right(90) myPen.left(45) myPen.penup() myPen.pendown() myPen.goto(0,0) myPen.circle(50) (X,Y) Coordinates The canvas we are drawing on (using Python Turtle) is 400 pixels wide by 400…
Learning Objectives By completing this challenge we are going to learn how to define our own functions in Python. We will also assign parameters to our functions. Look at the code below used to calculate the volume of a cube.…
Before comleting this challenge you may want to recap on our previous two challenges: Python Turtle: Sequencing Python Turtle: Iteration In this challenge we are using iteration to repeat a number of instructions over and over. Square Based Spiral #1:…
Let’s Recap In our previous challenge, we looked at using sequencing to write a program using Python Turtle to complete a drawing. Remember when using Python Turtle, the most useful instrcutions are as follows: myPen.color(“red”) myPen.forward(100) myPen.right(90) myPen.left(45) myPen.penup() myPen.pendown()…
Looking at the following code can you explain the purpose of each Python Turtle instruction: myPen.color(“red”) myPen.forward(100) myPen.right(90) myPen.left(45) myPen.penup() myPen.pendown() myPen.goto(0,0) myPen.circle(50) X and Y coordinates? Quadrant? Check the above picture. Can you state three facts about X and…