
Maynard Python Basics L1 EX1
Strings and Variables
In this lesson we are going to learn about strings and variables. A bit of sample code has been created that already works. The computer will ask you what your name is and then it will print out Hello and your first name. For example if your name was Pikachu the computer would say hello Pikachu
Input: Two arguments. Both are ints.
Output: Int.
Example:
name("Bob") == "Hello Bob" name("Pikachu" == "Hello Pikachu"
How it’s used: This is a very common useage in coding. We are allowing the computer to add prebuilt expressions (words) to inputs we type in. Allowing us to use the computer to automate tasks.
Precondition: The input command assumes everything we type in is a string so even numbers will work give 12 a try