some characters
print functionprint functionprint() sends characters (strings) to the standard outputString concatenation:
In your groups, try the following operations:
"abc" * 4+ and ,. What is the difference?They sang AaAaAaAaAaAaAaAaAaAa
print statementsprint statementsprint function sends the output cursor to the next line after printingAre You In College?
What other characters can you use for values for the end parameter?
Write a simple program that prints the following output to the python console:
He said, "What's up?" Joe's friend didn't reply.
Variable assignment does not produce any output to the console. Run the following code:
How would we print these variables?
Here’s a statement that invokes the print function with the expression 3 + 4 as an argument.
"hello" or 'hello'33.14True or FalseUse the function type() with each literal type.
Try the following operators with the different types in python:
+ - * / // % **
Variable assignments are not like math — they can appear in equations that make no mathematical sense.
x = x + 2 means “take the current value of x, add it with 2, and assign the resulting value (7) to x as its new value.”
Comments
Computer program can include comments, which are simply text that is meant to be read, but not executed.
The purpose of comments is to “document” the program so that subsequent readers can more easily understand it, or learn things about it (e.g., its original author).