Compucademy
Compucademy
  • 38
  • 40 269
Python Coding Challenge: The Josephus Problem
Update: oops, I was studying this puzzle for fun and didn't quite get the rules right. In the original problem, one people are eliminated, they no longer form part of the circle for the purposes of counting...
A fun Python coding challenge based on a classic historical puzzle.
Check out my Algorithmic Thinking with Python Courses on LinkedIn Learning:
www.linkedin.com/learning/foundations-of-algorithmic-thinking-with-python
www.linkedin.com/learning/advanced-algorithmic-thinking-with-python
🖥️🖥️🖥️🖥️🖥️🖥️🖥️🖥️
Pastebin with solution and text-to-circle code (not essential for solution):pastebin.com/jps12L5S
A great Maths lesson on the Josephus Problem: www.ucd.ie/mathstat/t4media/1.%20The%20Josephus%20problem.pdf
#python #algorithms #compsci #pythonbeginners #learntocode
Переглядів: 110

Відео

100 Doors Python Coding Challenge
Переглядів 815 місяців тому
A detailed video on the One Hundred Doors coding challenge in Python. Covers: - Algorithmic thinking - Lists - Boolean Variables - For loops and nested for loops This is a fun coding challenge for students with a grasp of the basics of Python programming to apply their skills and practice their algorithmic thinking.
Python Fizz Buzz Coding Challenge
Переглядів 1139 місяців тому
A walk-through of the famous Fizz Buzz Coding challenge. Ideal for Python beginners. 👩‍💻 💻 👨‍💻 Check out some of our teaching resources here, including a lesson on the Modulo operator: www.teacherspayteachers.com/Store/Compucademy #python #compsci #pythonbeginners #learntocode
Python Turtle Graphics Turtle Race Program
Переглядів 929 місяців тому
A fun program which creates a race between 2 turtles using the turtle graphics module in Python. ua-cam.com/video/RwASJdPfaEI/v-deo.html #python #compsci #pythonbeginners #turtlegraphics #learntocode
Python Password Checker Program
Переглядів 549 місяців тому
A basic Python exercise suitable for beginners. Get users to enter a password and print appropriate messages. Makes use of variable assignment, string and Boolean data types, while loop, getting user input and conditionals. The urls for the online IDE I use are: Program skeleton with comments: py3.codeskulptor.org/#user308_b4vFI9bDI1_0.py Solution: py3.codeskulptor.org/#user308_b4vFI9bDI1_1.py ...
An Introduction to While Loops in Python
Переглядів 8210 місяців тому
While loops are one of the fundamental control structures in Python, used for repeating tasks until a give condition is met. This video gives a simple example of a Python while loop and explains the importance of ensuring the code approaches the exit condition. #python #pythonbeginners #compsci #learntocode
Python Programming - Try Except Blocks
Переглядів 534 роки тому
This video shows you how to handle exceptions in Python programming with `try-except` blocks. This is a very important construct with many applications and will help you to make your programs more robust. Topics covered: - What is an exception in Python? - A basic example of a try-except block in Python - Handling index out of range errors The Compucademy website has many articles and resources...
Introduction to Git Version Control
Переглядів 404 роки тому
Learn about the powerful Git version control system used by millions to manage coding projects. Topics covered: - Cloning repositories from GitHub - Installing Git (on Windows) - Basic Git commands in a command-line interface - Initializing a new Git repository - Adding files to a Git repository - Making a commit Links from video: www.computerhope.com/issues/ch001927.htm github.com/Robin-Andrew...
Python Programming The Accumulator Pattern
Переглядів 4454 роки тому
# Python Programming - The Accumulator Pattern This is a video about a very common pattern in Python programs called "the Accumulator Pattern", which helps us to solve many different programming challenges. We use the example of a function to convert camelCase to snake_case variable names as an example. Topics covered: - What are snake_case and camelCase? - Building a function return value star...
Discrete Quantities vs Continuous Quantities in Computing
Переглядів 1414 роки тому
This is a video about the difference between discrete and continuous quantities and why that's important in computing. "Pixel resolution: The term resolution is often considered equivalent to pixel count in digital imaging, though international standards in the digital camera field specify it should instead be called "Number of Total Pixels" in relation to image sensors, and as "Number of Recor...
Introduction to GitHub as a Resource for Learning Programming and Computer Science
Переглядів 1204 роки тому
This video is about GitHub and how it can be used as a resource to accelerate your learning of programming and Computer Science. Topics covered: - What is GitHub? - How is GitHub related to Git (the version control system)? - Reading good code as a way to improve programming ability - Downloading repositories and files from GitHub github.com/ github.com/Robin-Andrews The Compucademy website has...
Deeper Understanding of Algorithms by Using a Whiteboard
Переглядів 2704 роки тому
This video discusses how useful whiteboards are for helping to understand algorithms when learning programming and Computer Science. Topics covered: - How whiteboards are a modern evolution of writing methods - How to explore the flow of an algorithm as well as its details using a whiteboard - Some examples of using a whiteboard to deepen understanding of algorithms e.g Depth-First Search, Dijk...
Python Test Driven Development Introduction
Переглядів 734 роки тому
This video is an introduction to the very basics of Test Driven Development in Python using simple `assert` statements Topics covered: - Thinking ahead about the expected behaviour of a Python program - Using `assert` statements as a basic type of test - Identifying and debugging logic errors in a Python program. We have a blog with many articles on learning Python programming and Computer Scie...
Visualizing Python Code Execution
Переглядів 6734 роки тому
This video is about tracing the execution of Python programs using an online visualization tool. Topics covered: - Stepping through Python programs line by line - Tracing variable values in Python programs - Sharing code tracing examples with others - The factorial function in Python Here's the link to the online Python code visualizer discussed in the video: cscircles.cemc.uwaterloo.ca/visuali...
Learning Procedures with Lightbot Game
Переглядів 2434 роки тому
Learning Procedures with Lightbot Game
Retro Sound Effects in Python
Переглядів 4514 роки тому
Retro Sound Effects in Python
Python Programming - From Algorithm to Program Statements
Переглядів 1034 роки тому
Python Programming - From Algorithm to Program Statements
Python Turtle Graphics Snake Game Part 4
Переглядів 5814 роки тому
Python Turtle Graphics Snake Game Part 4
Introduction to Codewars for Learning Python Programming
Переглядів 7 тис.4 роки тому
Introduction to Codewars for Learning Python Programming
Python Turtle Graphics Snake Game Part 3
Переглядів 1,1 тис.4 роки тому
Python Turtle Graphics Snake Game Part 3
Using Loops in Python Programming
Переглядів 1034 роки тому
Using Loops in Python Programming
Python Turtle Screen Methods
Переглядів 2,1 тис.4 роки тому
Python Turtle Screen Methods
Python Turtle Graphics Snake Game Part 2
Переглядів 1,5 тис.4 роки тому
Python Turtle Graphics Snake Game Part 2
Python Turtle Graphics Snake Game Part 1
Переглядів 3,4 тис.4 роки тому
Python Turtle Graphics Snake Game Part 1
Python Turtle Stamps and Click Events
Переглядів 3,8 тис.4 роки тому
Python Turtle Stamps and Click Events
Running Python Scripts from a Command Line
Переглядів 1,8 тис.4 роки тому
Running Python Scripts from a Command Line
Modelling an SR Flip Flip as a Finite State Machine with Python
Переглядів 1964 роки тому
Modelling an SR Flip Flip as a Finite State Machine with Python
Nested FOR Loops in Python
Переглядів 2264 роки тому
Nested FOR Loops in Python
Python Learning Resources for Beginners
Переглядів 1494 роки тому
Python Learning Resources for Beginners
Flowcharts for GCSE Computer Science
Переглядів 9454 роки тому
Flowcharts for GCSE Computer Science

КОМЕНТАРІ

  • @transparentguy9096
    @transparentguy9096 Місяць тому

    Thanks for explaining. Came from Coursera's ARM course

  • @rbx4472
    @rbx4472 3 місяці тому

    very helpful, thanks a lot's

  • @danial2979
    @danial2979 4 місяці тому

    nice

  • @اهلاويوافتخر-ص4ك

    nice

  • @kingkilafootball321
    @kingkilafootball321 Рік тому

    Thanks man, you rule, very awesome, love you, keep it up. Hope to be as good as you one day.

  • @jenso413
    @jenso413 2 роки тому

    very helpful, thanks!

  • @Yeah_bruv
    @Yeah_bruv 2 роки тому

    I've reecently picked up Python annd learning a lot. But, what I am finding is how creative some of the problem solving is - it's amazing

  • @kidsrkreativ4562
    @kidsrkreativ4562 3 роки тому

    Very well explained thank you a lot!!

  • @minatonamikaze2034
    @minatonamikaze2034 3 роки тому

    POGGAS

  • @mr.hunter6259
    @mr.hunter6259 3 роки тому

    Wow I love💓💓💓💓💓

  • @maebaya8863
    @maebaya8863 3 роки тому

    Hi! thank you for this video : ) I have a little question, is it possible to link the opposite borders of the turtle screen in this game? So when the snake goes through one side, it comes out through the opposite side? If yes, can you tell me😟 I've tried checking on Google but didn't find anything : (

  • @maebaya8863
    @maebaya8863 3 роки тому

    Hi! thank you for this video : ) I have a little question, is it possible to link the opposite borders of the turtle screen in this game? So when the snake goes through one side, it comes out through the opposite side? If yes, can you tell me😟 I've tried checking on Google but didn't find anything : (

  • @namrata5025
    @namrata5025 3 роки тому

    you dont even show us the result of this code...waste of time

    • @og_jobro
      @og_jobro 3 роки тому

      You stupid he did

    • @namrata5025
      @namrata5025 3 роки тому

      @@og_jobro when?

    • @og_jobro
      @og_jobro 3 роки тому

      the end

    • @og_jobro
      @og_jobro 3 роки тому

      all that was done was making the snake. move

  • @polunochNY
    @polunochNY 3 роки тому

    how i can change icon of window? help please

  • @Aaaaaraaaav
    @Aaaaaraaaav 3 роки тому

    It is showing error when I click the dot

  • @hazike230
    @hazike230 3 роки тому

    You're big help for me! Thank you!

  • @zaksept
    @zaksept 3 роки тому

    This is helpful thanks for uploading it. I came across it via your website (compu-cademy).

  • @LeonTVRyt
    @LeonTVRyt 3 роки тому

    thats fine a lot of people do that

  • @nasseralmuhannadi2841
    @nasseralmuhannadi2841 3 роки тому

    Nice

  • @kingstewie6436
    @kingstewie6436 3 роки тому

    GREAT EXPLAINING THANK YOU!!

  • @boss4078
    @boss4078 3 роки тому

    Very good video. What does the last line do/mean in the code?

  • @shivankitss8396
    @shivankitss8396 3 роки тому

    Just what I needed.

  • @roberthensley7130
    @roberthensley7130 4 роки тому

    Thank you for explaining the accumulator logic!

  • @surya_xhandle
    @surya_xhandle 4 роки тому

    Hey. It will be much better if you increase the volume and quality of your voice. :-)

  • @Sreedeviha
    @Sreedeviha 4 роки тому

    Very well explained... Thanks @Compucademy.. very detailed explanation and at the end a revision as well...

  • @hidannama16
    @hidannama16 4 роки тому

    You are doing commendable job on UA-cam. I am surprised that you haven't gained more subs yet. Just keep making such more in depth informative videos which explains such stuff ( and I have seen your other videos as well ) in such great details and you channel will definitely gonna grow someday. Just keep doing this good work and if possible do upload videos more often. I will drop my two cents here... Please do change your intro music and maybe work on your thumbnails if you can for gaining more views and subs. You have earned my sub and like as well. Keep doing this good work.

    • @compucademy
      @compucademy 4 роки тому

      Hi Hidan, I'm glad you like my content. I'm curious though, why don't you think the music fits? I was going for "delightfully geeky" (I wrote it myself on a GameBoy!), but maybe to you it sounds dated or something?

  • @compucademy
    @compucademy 4 роки тому

    I quoted the source below. Christian mentioned to me his was similar. Not surprising really since same language and library. Boring comments.

  • @loredfolk1069
    @loredfolk1069 4 роки тому

    hm.. the code looks like u copied of another youtuber. oops exposed

    • @compucademy
      @compucademy 4 роки тому

      Do you have a source for that? The code was initially based off this article: www.edureka.co/blog/python-turtle-module/, but it had some issues which I address in this series. The resulting code is much more robust. For example not using `while True` in an event-driven environment, and also not just hiding the body segments off-screen each time the snake crashes, which leads to serious memory leakage. Overall you comment seems pretty unhelpful.

    • @LeonTVRyt
      @LeonTVRyt 3 роки тому

      compud is right

    • @loredfolk1069
      @loredfolk1069 3 роки тому

      @@compucademy you keep looking some where else as if your copying something. If you know how to make it then why look. Just code it off the bat

    • @namrata5025
      @namrata5025 3 роки тому

      @@compucademy No wonder you just have 21 likes....its suprising no one disliked.....these are true comments not boring ones

    • @namrata5025
      @namrata5025 3 роки тому

      Oh yay you have one dislike now

  • @Rishavhacx
    @Rishavhacx 4 роки тому

    It is really amazing... Keep it up brother

  • @kachirikashiruka
    @kachirikashiruka 4 роки тому

    Please upload the 3 part please for God snake

  • @derrickleger9558
    @derrickleger9558 4 роки тому

    have you created the next video for using dijkstras?

  • @bensmith9253
    @bensmith9253 4 роки тому

    This is great. Very clearly explained.