The `print()` function in Python is used to display output to the console or terminal. It allows you to print text, variables, or expressions for debugging purposes or to provide information to the user. The `print()` function takes one or more arguments, which can be strings, variables, or expressions, and displays them as output.
Here are a few examples to illustrate the use of the `print()` function:
```python
# Example 1: Printing a string
print("Hello, World!")
```
In this example, the `print()` function is used to display the string "Hello, World!" as output.
```python
# Example 2: Printing variables
name="John"
age=25
print("Name:",name)
print("Age:",age)
```
In this example, the `print()` function is used to display the values of the variables `name` and `age`. The output will be:
```
Name: John
Age: 25
```
```python
# Example 3: Printing expressions
x=5
y=3
print("Sum:",x+y)
print("Product:",x*y)
```
In this example, the `print()` function is used to display the results of arithmetic expressions involving the variables `x` and `y`. The output will be:
```
Sum: 8
Product: 15
```
The `print()` function is a useful tool for displaying information during program execution and can be used in various ways to provide output to the user or for debugging purposes.
This week we will be introducing the python programming langauge, such that some of the key programming concepts are familiar. This weeks **first lecture** will be on Python and will be an interactive session, so bring your laptop and follow along if you like.
This weeks **second lecture** will be preparation for next weeks first piece of work looking at computational thinking. Please be sure to attend this session as it will allow us to ensure everyone has been introduced to these topics before practical sessions.
## This week you are working on...
- Beginning to learn the python programming language
- Documenting some python code to use as a reference for yourself by following the practical exercises.
*Optionally*
For those already familiar with python you an explore the practical extensions.
> NOTE: These are designed to challenge those with existing knowledge and are not a required part of this module.
## Have already completed ...
You should have completed the setup by now. If not please address this as quickly as possible by following the [setup guide and ensuring you have done everything on the checklist](https://gitlab.uwe.ac.uk/ctap/ctap-resources/-/blob/main/guides/setup.md?ref_type=heads).
## By the end of the week...
... you should have completed:
- Experimented with writing markdown and python inside of the `ctap-portfolio/practicals` folder
- W3 schools [tutorial and reference](https://www.w3schools.com/python/)
- Raspberry Pi Foundation [tutorials](https://projects.raspberrypi.org/en/pathways/python-intro?gclid=Cj0KCQjwpompBhDZARIsAFD_Fp8FpuLGfd6v863VziU4rGdV-ZHkcnu-bhjB0KuGS1fyYLBHiXpazGcaAnGuEALw_wcB)
## Videos
-[Python in 100 seconds](https://www.youtube.com/watch?v=x7X9w_GIm1s)
- Learn [python in 1 hour](https://www.youtube.com/watch?v=kqtD5dpn9C8)
- Python [Bad habits you need to ditch!](https://www.youtube.com/watch?v=qUeud6DvOWI)
-[Functional programming in python series ](https://www.youtube.com/watch?v=xJCPpDlk9_w&list=PLP8GkvaIxJP1z5bu4NX_bFrEInBkAgTMr)(Advanced)