0% found this document useful (0 votes)
2 views2 pages

Programming in Python Takeaways

The document provides an overview of basic Python programming concepts, including syntax rules for displaying output and performing arithmetic operations. It explains the importance of code comments and how they can be used to ignore certain lines of code. Additionally, it emphasizes that programming involves giving instructions to a computer using a programming language like Python.

Uploaded by

yyuan25
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Programming in Python Takeaways

The document provides an overview of basic Python programming concepts, including syntax rules for displaying output and performing arithmetic operations. It explains the importance of code comments and how they can be used to ignore certain lines of code. Additionally, it emphasizes that programming involves giving instructions to a computer using a programming language like Python.

Uploaded by

yyuan25
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
Programming in Python: Takeaways & by Dataquest Labs, Inc. - All rights reserved © 2020 Syntax * Displaying the output of a computer program: print(1¥ 2) print (* 10) + Ignoring certain lines of code by using code comments: ® print (I+ 2) print (5¢ 10) # Thisprogramil Lonlyprint50 * Performing arithmetical operations: 1e2 4-5 3081 20/3 483 (4 18)#42/ 10 Concepts + When we give a computer a set of instructions, we say that we're programming it. To program a computer, we need to write the instructions in a special language, which we call a programming language. + Python has syntax rules, and each line of instruction has to comply with these rules. For example, print(23+7) print(10- 6) print(12+38) doesn't comply with Python's syntax rules and raises a syntax error + ‘The instructions we send to the computer are collectively known as code. Each line of, instruction is known as a line of code. + When we write code, we program the computer to do something, For this reason, we also call the code we write a computer program, or a program. + ‘The code we write serves as input to the computer. ‘The result of executing the code is called output ‘The sequence of characters that follows the # symbol is called a code comment. We can use code comments to stop the computer executing a line of code or add information about the code we write. 6 TakeawaybyDataquedabsinc-Alightzeserved 2020

You might also like