Skip to content
Snippets Groups Projects
Commit f1358a07 authored by Nathan's avatar Nathan
Browse files

week8

parent 9020858b
No related branches found
No related tags found
No related merge requests found
# The Print Function
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.
\ No newline at end of file
...@@ -4,11 +4,12 @@ To take part in the Computational Thinking and Practice (CTAP) module, there are ...@@ -4,11 +4,12 @@ To take part in the Computational Thinking and Practice (CTAP) module, there are
For refernce, these are: For refernce, these are:
- [ ] Python Installation - [ ] Python Installation
- [ ] VS Code - [ ] VS Code
- [ ] Install Extension: Python - [ ] Install Extension: Python
- [ ] Install Extension: Markdown Preview Enhanced - [ ] Install Extension: Markdown Preview Enhanced
- [ ] Download `ctap-portfolio` - [ ] Download `ctap-portfolio`
- [ ] Configure backup/ file sync for portfolio files - [ ] Configure backup/ file sync for portfolio files
> Note: VS Code and Python will be available on UWE machines > Note: VS Code and Python will be available on UWE machines
......
# Week 8
**This weeks quiz:** https://go.uwe.ac.uk/ctapQuiz
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
## Resources
- week8/practical8
- [Setup Guide](https://gitlab.uwe.ac.uk/ctap/ctap-resources/-/blob/main/guides/setup.md?ref_type=heads)
- [Markdown Guide](https://gitlab.uwe.ac.uk/ctap/ctap-resources/-/blob/main/guides/markdown.md?ref_type=heads)
### External resources
- [Learn Python .org's interactive python tutorials](https://www.learnpython.org/)
- 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)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment