Python is one of the most popular programming languages today,... Show more
Sign up to see the contentIt's free!
Access to all documents
Improve your grades
Join milions of students
By signing up you accept Terms of Service and Privacy Policy
Responding to change (a2 only)
Infection and response
Homeostasis and response
Energy transfers (a2 only)
Cell biology
Organisms respond to changes in their internal and external environments (a-level only)
Biological molecules
Organisation
Substance exchange
Bioenergetics
Genetic information & variation
Inheritance, variation and evolution
Genetics & ecosystems (a2 only)
Ecology
Cells
Show all topics
Britain & the wider world: 1745 -1901
1l the quest for political stability: germany, 1871-1991
The cold war
Inter-war germany
Medieval period: 1066 -1509
2d religious conflict and the church in england, c1529-c1570
2o democracy and nazism: germany, 1918-1945
1f industrialisation and the people: britain, c1783-1885
1c the tudors: england, 1485-1603
2m wars and welfare: britain in transition, 1906-1957
World war two & the holocaust
2n revolution and dictatorship: russia, 1917-1953
2s the making of modern britain, 1951-2007
World war one
Britain: 1509 -1745
Show all topics

5
0
๐จ๐๐๐๐๐๐๐
09/12/2025
Computer Science
Coding in Python
166
โข
9 Dec 2025
โข
๐จ๐๐๐๐๐๐๐
@anoushka047
Python is one of the most popular programming languages today,... Show more




Python makes coding feel less intimidating because it uses simple commands that make sense. The print() function displays text on screen - just put your message inside speech marks like print("Hello world!"). When you want to start a new line, use \n in the middle of your print statement.
Variables are like containers that store information for later use. A string is any collection of letters (like 'Hello world!'), whilst an integer is simply a number (like 7). When you want user input, use the input() function - just remember to add int() around it if you're expecting a number.
Syntax errors happen when you make mistakes in Python's 'grammar' - like forgetting brackets or speech marks. Don't worry though, everyone gets these! Python will tell you exactly what's wrong so you can fix it quickly.
Top Tip: Interactive mode lets you test code instantly, but script mode lets you save your work. Use script mode for anything you want to keep!

Python handles maths exactly as you'd expect, with one sneaky difference. Addition (+), subtraction (-), and division (/) work normally, but multiplication uses the asterisk symbol (*) instead of ร. Always comment your code using the # symbol - this helps others (and future you!) understand what each bit does.
IF statements make your programs intelligent by letting them make decisions. You'll use comparison operators like == (equal to), != (not equal to), > (greater than), and < (less than) to create conditions. Remember that = assigns values to variables, whilst == checks if things are equal.
The magic happens when you combine elif (else if) and else statements. Your program can check multiple conditions in order, like giving different grades based on test scores. If the first condition fails, it tries the next one, and so on.
Quick Check: Can you spot why
if grade >= 80comes beforeif grade >= 70in a grading system?

Loops are absolute game-changers because they make computers repeat tasks automatically - this is called iteration. Instead of writing the same code twenty times, you write it once and let the loop handle the repetition.
For loops run a specific number of times using range(). Here's the tricky bit: loops always start counting from 0, and range(0,5) actually runs 5 times (0, 1, 2, 3, 4). The second number is always one more than the last number you want. Loop variables are traditionally called i, j, or k.
While loops are condition-controlled, meaning they keep going whilst something remains true. They use the same comparison operators as IF statements, but instead of doing something once, they repeat until the condition becomes false. This makes them perfect for things like password checkers or games that continue until someone wins.
Warning: Be careful with while loops - if your condition never becomes false, your program will run forever!
Our AI Companion is a student-focused AI tool that offers more than just answers. Built on millions of Knowunity resources, it provides relevant information, personalised study plans, quizzes, and content directly in the chat, adapting to your individual learning journey.
You can download the app from Google Play Store and Apple App Store.
That's right! Enjoy free access to study content, connect with fellow students, and get instant help โ all at your fingertips.
App Store
Google Play
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
Stefan S
iOS user
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Samantha Klich
Android user
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.
Anna
iOS user
Best app on earth! no words because itโs too good
Thomas R
iOS user
Just amazing. Let's me revise 10x better, this app is a quick 10/10. I highly recommend it to anyone. I can watch and search for notes. I can save them in the subject folder. I can revise it any time when I come back. If you haven't tried this app, you're really missing out.
Basil
Android user
This app has made me feel so much more confident in my exam prep, not only through boosting my own self confidence through the features that allow you to connect with others and feel less alone, but also through the way the app itself is centred around making you feel better. It is easy to navigate, fun to use, and helpful to anyone struggling in absolutely any way.
David K
iOS user
The app's just great! All I have to do is enter the topic in the search bar and I get the response real fast. I don't have to watch 10 YouTube videos to understand something, so I'm saving my time. Highly recommended!
Sudenaz Ocak
Android user
In school I was really bad at maths but thanks to the app, I am doing better now. I am so grateful that you made the app.
Greenlight Bonnie
Android user
very reliable app to help and grow your ideas of Maths, English and other related topics in your works. please use this app if your struggling in areas, this app is key for that. wish I'd of done a review before. and it's also free so don't worry about that.
Rohan U
Android user
I know a lot of apps use fake accounts to boost their reviews but this app deserves it all. Originally I was getting 4 in my English exams and this time I got a grade 7. I didnโt even know about this app three days until the exam and it has helped A LOT. Please actually trust me and use it as Iโm sure you too will see developments.
Xander S
iOS user
THE QUIZES AND FLASHCARDS ARE SO USEFUL AND I LOVE THE SCHOOLGPT. IT ALSO IS LITREALLY LIKE CHATGPT BUT SMARTER!! HELPED ME WITH MY MASCARA PROBLEMS TOO!! AS WELL AS MY REAL SUBJECTS ! DUHHH ๐๐๐ฒ๐ค๐โจ๐๐ฎ
Elisha
iOS user
This apps acc the goat. I find revision so boring but this app makes it so easy to organize it all and then you can ask the freeeee ai to test yourself so good and you can easily upload your own stuff. highly recommend as someone taking mocks now
Paul T
iOS user
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
Stefan S
iOS user
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Samantha Klich
Android user
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.
Anna
iOS user
Best app on earth! no words because itโs too good
Thomas R
iOS user
Just amazing. Let's me revise 10x better, this app is a quick 10/10. I highly recommend it to anyone. I can watch and search for notes. I can save them in the subject folder. I can revise it any time when I come back. If you haven't tried this app, you're really missing out.
Basil
Android user
This app has made me feel so much more confident in my exam prep, not only through boosting my own self confidence through the features that allow you to connect with others and feel less alone, but also through the way the app itself is centred around making you feel better. It is easy to navigate, fun to use, and helpful to anyone struggling in absolutely any way.
David K
iOS user
The app's just great! All I have to do is enter the topic in the search bar and I get the response real fast. I don't have to watch 10 YouTube videos to understand something, so I'm saving my time. Highly recommended!
Sudenaz Ocak
Android user
In school I was really bad at maths but thanks to the app, I am doing better now. I am so grateful that you made the app.
Greenlight Bonnie
Android user
very reliable app to help and grow your ideas of Maths, English and other related topics in your works. please use this app if your struggling in areas, this app is key for that. wish I'd of done a review before. and it's also free so don't worry about that.
Rohan U
Android user
I know a lot of apps use fake accounts to boost their reviews but this app deserves it all. Originally I was getting 4 in my English exams and this time I got a grade 7. I didnโt even know about this app three days until the exam and it has helped A LOT. Please actually trust me and use it as Iโm sure you too will see developments.
Xander S
iOS user
THE QUIZES AND FLASHCARDS ARE SO USEFUL AND I LOVE THE SCHOOLGPT. IT ALSO IS LITREALLY LIKE CHATGPT BUT SMARTER!! HELPED ME WITH MY MASCARA PROBLEMS TOO!! AS WELL AS MY REAL SUBJECTS ! DUHHH ๐๐๐ฒ๐ค๐โจ๐๐ฎ
Elisha
iOS user
This apps acc the goat. I find revision so boring but this app makes it so easy to organize it all and then you can ask the freeeee ai to test yourself so good and you can easily upload your own stuff. highly recommend as someone taking mocks now
Paul T
iOS user
๐จ๐๐๐๐๐๐๐
@anoushka047
Python is one of the most popular programming languages today, and it's brilliant for beginners because it reads almost like English! You'll learn the essential building blocks that every programmer needs to know, from displaying messages and storing information to... Show more

Access to all documents
Improve your grades
Join milions of students
By signing up you accept Terms of Service and Privacy Policy
Python makes coding feel less intimidating because it uses simple commands that make sense. The print() function displays text on screen - just put your message inside speech marks like print("Hello world!"). When you want to start a new line, use \n in the middle of your print statement.
Variables are like containers that store information for later use. A string is any collection of letters (like 'Hello world!'), whilst an integer is simply a number (like 7). When you want user input, use the input() function - just remember to add int() around it if you're expecting a number.
Syntax errors happen when you make mistakes in Python's 'grammar' - like forgetting brackets or speech marks. Don't worry though, everyone gets these! Python will tell you exactly what's wrong so you can fix it quickly.
Top Tip: Interactive mode lets you test code instantly, but script mode lets you save your work. Use script mode for anything you want to keep!

Access to all documents
Improve your grades
Join milions of students
By signing up you accept Terms of Service and Privacy Policy
Python handles maths exactly as you'd expect, with one sneaky difference. Addition (+), subtraction (-), and division (/) work normally, but multiplication uses the asterisk symbol (*) instead of ร. Always comment your code using the # symbol - this helps others (and future you!) understand what each bit does.
IF statements make your programs intelligent by letting them make decisions. You'll use comparison operators like == (equal to), != (not equal to), > (greater than), and < (less than) to create conditions. Remember that = assigns values to variables, whilst == checks if things are equal.
The magic happens when you combine elif (else if) and else statements. Your program can check multiple conditions in order, like giving different grades based on test scores. If the first condition fails, it tries the next one, and so on.
Quick Check: Can you spot why
if grade >= 80comes beforeif grade >= 70in a grading system?

Access to all documents
Improve your grades
Join milions of students
By signing up you accept Terms of Service and Privacy Policy
Loops are absolute game-changers because they make computers repeat tasks automatically - this is called iteration. Instead of writing the same code twenty times, you write it once and let the loop handle the repetition.
For loops run a specific number of times using range(). Here's the tricky bit: loops always start counting from 0, and range(0,5) actually runs 5 times (0, 1, 2, 3, 4). The second number is always one more than the last number you want. Loop variables are traditionally called i, j, or k.
While loops are condition-controlled, meaning they keep going whilst something remains true. They use the same comparison operators as IF statements, but instead of doing something once, they repeat until the condition becomes false. This makes them perfect for things like password checkers or games that continue until someone wins.
Warning: Be careful with while loops - if your condition never becomes false, your program will run forever!
Our AI Companion is a student-focused AI tool that offers more than just answers. Built on millions of Knowunity resources, it provides relevant information, personalised study plans, quizzes, and content directly in the chat, adapting to your individual learning journey.
You can download the app from Google Play Store and Apple App Store.
That's right! Enjoy free access to study content, connect with fellow students, and get instant help โ all at your fingertips.
5
Smart Tools NEW
Transform this note into: โ 50+ Practice Questions โ Interactive Flashcards โ Full Mock Exam โ Essay Outlines
App Store
Google Play
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
Stefan S
iOS user
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Samantha Klich
Android user
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.
Anna
iOS user
Best app on earth! no words because itโs too good
Thomas R
iOS user
Just amazing. Let's me revise 10x better, this app is a quick 10/10. I highly recommend it to anyone. I can watch and search for notes. I can save them in the subject folder. I can revise it any time when I come back. If you haven't tried this app, you're really missing out.
Basil
Android user
This app has made me feel so much more confident in my exam prep, not only through boosting my own self confidence through the features that allow you to connect with others and feel less alone, but also through the way the app itself is centred around making you feel better. It is easy to navigate, fun to use, and helpful to anyone struggling in absolutely any way.
David K
iOS user
The app's just great! All I have to do is enter the topic in the search bar and I get the response real fast. I don't have to watch 10 YouTube videos to understand something, so I'm saving my time. Highly recommended!
Sudenaz Ocak
Android user
In school I was really bad at maths but thanks to the app, I am doing better now. I am so grateful that you made the app.
Greenlight Bonnie
Android user
very reliable app to help and grow your ideas of Maths, English and other related topics in your works. please use this app if your struggling in areas, this app is key for that. wish I'd of done a review before. and it's also free so don't worry about that.
Rohan U
Android user
I know a lot of apps use fake accounts to boost their reviews but this app deserves it all. Originally I was getting 4 in my English exams and this time I got a grade 7. I didnโt even know about this app three days until the exam and it has helped A LOT. Please actually trust me and use it as Iโm sure you too will see developments.
Xander S
iOS user
THE QUIZES AND FLASHCARDS ARE SO USEFUL AND I LOVE THE SCHOOLGPT. IT ALSO IS LITREALLY LIKE CHATGPT BUT SMARTER!! HELPED ME WITH MY MASCARA PROBLEMS TOO!! AS WELL AS MY REAL SUBJECTS ! DUHHH ๐๐๐ฒ๐ค๐โจ๐๐ฎ
Elisha
iOS user
This apps acc the goat. I find revision so boring but this app makes it so easy to organize it all and then you can ask the freeeee ai to test yourself so good and you can easily upload your own stuff. highly recommend as someone taking mocks now
Paul T
iOS user
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
Stefan S
iOS user
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Samantha Klich
Android user
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.
Anna
iOS user
Best app on earth! no words because itโs too good
Thomas R
iOS user
Just amazing. Let's me revise 10x better, this app is a quick 10/10. I highly recommend it to anyone. I can watch and search for notes. I can save them in the subject folder. I can revise it any time when I come back. If you haven't tried this app, you're really missing out.
Basil
Android user
This app has made me feel so much more confident in my exam prep, not only through boosting my own self confidence through the features that allow you to connect with others and feel less alone, but also through the way the app itself is centred around making you feel better. It is easy to navigate, fun to use, and helpful to anyone struggling in absolutely any way.
David K
iOS user
The app's just great! All I have to do is enter the topic in the search bar and I get the response real fast. I don't have to watch 10 YouTube videos to understand something, so I'm saving my time. Highly recommended!
Sudenaz Ocak
Android user
In school I was really bad at maths but thanks to the app, I am doing better now. I am so grateful that you made the app.
Greenlight Bonnie
Android user
very reliable app to help and grow your ideas of Maths, English and other related topics in your works. please use this app if your struggling in areas, this app is key for that. wish I'd of done a review before. and it's also free so don't worry about that.
Rohan U
Android user
I know a lot of apps use fake accounts to boost their reviews but this app deserves it all. Originally I was getting 4 in my English exams and this time I got a grade 7. I didnโt even know about this app three days until the exam and it has helped A LOT. Please actually trust me and use it as Iโm sure you too will see developments.
Xander S
iOS user
THE QUIZES AND FLASHCARDS ARE SO USEFUL AND I LOVE THE SCHOOLGPT. IT ALSO IS LITREALLY LIKE CHATGPT BUT SMARTER!! HELPED ME WITH MY MASCARA PROBLEMS TOO!! AS WELL AS MY REAL SUBJECTS ! DUHHH ๐๐๐ฒ๐ค๐โจ๐๐ฎ
Elisha
iOS user
This apps acc the goat. I find revision so boring but this app makes it so easy to organize it all and then you can ask the freeeee ai to test yourself so good and you can easily upload your own stuff. highly recommend as someone taking mocks now
Paul T
iOS user