As part of this project you will learn:
Computer programming, also known as coding, is the process of designing, writing, and instructing a computer to perform specific tasks or solve problems. It involves creating a set of instructions, called code, using a Programming Language that the computer can understand and execute.
We will learn a text-based programming language called Python.
Students may create a free account to save all the projects-> click here, and note that parental permission is required to create accounts for children under 13.
IMPORTANT!: It's important to understand that Trinket creates public web pages and projects that anyone with a link can view. Young people may need a reminder about the importance of not sharing personal information online.
The input() allows you to input information into the program. Let's ask to enter the name. Type the following code into the next line:
Click Run, this piece of code will ask you to enter your name. Enter your name.
Your name will be stored in the code in the variable called name. Variables are containers for storing data values.
Now our program knows your name, so let's print it out. Type the next line of code as shown in the picture:
After you run the code you will be able to see that program printed out a greeting to you.
Now let's create some pictures using text symbols, type the following code:
In Python, using the r'''...''' syntax is known as a "raw string" or "raw string literal." It's commonly used when working with strings that contain backslashes (\)
In Python, \n is a special escape sequence that represents a newline character. It is used within strings to indicate the end of a line and instructs the text to move to the next line when printed or displayed.
You have completed this project.