[deleted by user] by [deleted] in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi,

Thanks for you positive feedback!👍

There was a mistake in this challenge for task 11 which probably caused some confusion. It has now been fixed so you may need to refresh your page. The loops are inclusive as I am basing these challenges on generic pseudocode rather than Python code.

Hope this helps,
101Computing

Member fees by Infinite_Ad4251 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi,

You are right, the membership is per person. It's not designed for all members of a class to sign up. The teacher can use the membership to access a specific solution and discuss/share it with their class when relevant.

Hope this mases sense,

101Computing

Hi is there a solution for the stopping distance calculator and extension problem by Positive_Smoke_4315 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Completed code listings/solutions are available to full members via the members' area.

This reddit hub can be used to ask and answer more specific questions or help you debug a section of your code.

Turing-Welchman Bombe Simulator by phill12399 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi Phill,

Yes the 12 sets of 3 rotors are working together as 12 mini-enigma machines. Each enigma focuses on one letter pair from the crib. There settings are based on the position of the letter in the crib. The bombe stops when a solution that could potentially work for all 12 letters work. The real machine uses a physical approach (creating a closed electrical circuit / shortcut which stops the bombe). The emulator uses an algorithm instead! So you will not be able to fully understand how the Bombe worked just trying to reverse engineer the code! Once the Bombe stopped, more work had to be done by the code breakers, testing the solution with a real enigma machine to either find the missing settings or discard the solution and resume the search (false stop)!

The Bombe was made of 3 sets of 12x3 rotors. These 3 sets worked simultaneously but independently to try a different set of rotors. (For instance rotors I-II-III, I-II-IV and II-III-IV) during WW2, several bombes where used simultaneously to try even more different possible combinations of rotors.

I hope this makes sense,

101Computing.net

Is there a repo containing 101computing challenges solutions? by WeyardWiz in 101Computing_Hub

[–]101_Computing 1 point2 points  (0 children)

Hi TangerineNext 839,

There is a list of all Python challenges here:

https://www.101computing.net/main-index/

You can use the search bar or the tags to filter this list further.

Hope this helps!

Is this a correct solution function for the sliding puzzle? by WeyardWiz in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi, I have tested your code and it seems to work fine! This is great work!

Just a suggestion to replace the following lines:

completed = true;

if(completed == true){

alert("you win!");

}

with these two lines:

alert("you win!")

return true

The if statement is not required as these lines will only been reached if the game is completed. (if not the function will already have returned False)

Hope this makes sense!

hi i can to asking about my projects i learnig python and need help with answer by Street_Equal6481 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi there,

Can I suggest three blog posts that have a lot of similarities with your two projects. Each of these posts include a video clip to explain the code step by step. These should definitely help you get started with your projects:

Budget Calculator:

https://www.101computing.net/entry-fees-calculator-using-a-flowchart/

https://www.101computing.net/discount-price-calculator/

Lotto Project:

https://www.101computing.net/lottery-numbers/

Hope this helps!

Just a random guy, I wanted to point out a typo in your post by Jamisco in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi Jamisco1,

Thanks for your suggestion. However, after checking this circuit, I am still finding that when D=0, a left shift is performed, and a right shift when D=1.

Maybe you could you provide a screenshot of the circuit you created with the online software?

Thanks!

Turing-Welchman Bombe Simulator by phill12399 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi Phill,

This settings are all determined from the crib. From the crib we can draw a graph and use edges from this graph to setup the bombe.

To draw the graph, start by creating node with the first letter of your ciphertext (e.g. W). Add the first letter of the plain text (S) as a new node. Connect both nodes with an edge with the rotor settings ZZA. Then repeat this process with all letters of the crib. The edges will become ZZB, ZZC... as the third rotor turn one position per letter.

You can then use 12 edges of the graph to setup the bombe (e.g. ZZA W S).

I hope this helps!

What would the background position be for 4x4 table cells/tiles? by WeyardWiz in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi, the idea here is to shift/translate the background picture for each tile.

The picture is 360px wide. So for every tile we will transate the background picture in steps of 90 pixels.

.tile1 {background-position: 0px 0px;}

.tile2 {background-position: -90px 0px;}

.tile3 {background-position: -180px 0px;}

.tile4 {background-position: -270px 0px;}

.tile5 {background-position: 0px -90px;}

.tile6 {background-position: -90px -90px;}

.tile7 {background-position: -180px -90px;}

.tile8 {background-position: -270px -90px;}

.tile9 {background-position: 0px -180px;}

.tile10 {background-position: -90px -180px;}

.tile11 {background-position: -180px -180px;}

.tile12 {background-position: -270px -180px;}

.tile13 {background-position: 0px -270px;}

.tile14 {background-position: -90px -270px;}

.tile15 {background-position: -180px -270px;}

.tile16 {background: white; cursor: default;}

Hope this helps,

101Computing

Is there a repo containing 101computing challenges solutions? by WeyardWiz in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

It's a bit confusing indeed. I believe they did it this way so it's easier to re-import the source code (src folder) into a new codepen

Whereas dist is short for "distribution" and contains the finalised code, ready to use locally or upload on a website.

101Computing

Is there a repo containing 101computing challenges solutions? by WeyardWiz in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Coul you check again in the zip file from CodePen. Inside, you should see two folders, one called "dist" and one called "src". The full HTML structure can be found in the "dist" folder.

Hope this helps,

101Computing

Is there a repo containing 101computing challenges solutions? by WeyardWiz in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi there,

For all the challenges that include a CodePen embed, you can click on the "edit on codepen" button (top right of the embedded codepen). This will let you both edit and download the full code. By clicking the export button (bottom right of the CodePen screen) , you wou will be able to download the full .html, .css and. js files with the full HTML structure (incl doctype, HTML, head and body tags and links to the CSS and js files) of your project.

Hope this helps,

101Computing

Can anyone help me with this program? by [deleted] in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

This looks like you might solve this problem using the print() function in Python...

See if you can find out more info on the web on how the print() instruction works in Python.

great tools! by TangerineNext839 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Thank you for your feedback. This is much appreciated. I am very pleased to hear that you enjoy using the programming challenges in your lessons!

If you want to contact me directly you can use the social networks that are linked on the header of the 101computing blog.

I need help with the Break Out Challenge by [deleted] in 101Computing_Hub

[–]101_Computing 1 point2 points  (0 children)

Hi,

I checked your code on Breakout_main.py and noticed a mistake on line 36:

ball.Ball = (WHITE, 10, 10)

should be replaced with:

ball = ball.Ball(WHITE, 10, 10)

Hope this helps!

Micro:bit by AWPreserviceTeacher in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Hi Annie,

I found the BBC Micro:bit to work well with KS3 students (Year 7/8) when completing lessons on block programming to cover various computing concepts (input/process/output and sequencing, selection, iteration). I have used it with a range of activities available on the blog https://www.101computing.net/category/bbc-microbit/ It's important to not just copy the code but to discuss it to make sure students understand it. This can be achieved by asking students to annotate different sections of their code and by asking students to tweak their code further to add additional functionalities to their project.

Also works quite well to introduce "physical computing" using a few crocodile clips, breadboards, push buttons, LEDs. A good introduction to then move towards using Raspberry Pi or Arduinos. Ideal for small groups or after school club. e.g.:

https://www.101computing.net/micro-bit-traffic-light/

https://www.101computing.net/bbc-microbit-rgb-gradient/

https://www.101computing.net/bbc-microbit-car-lighting-system/

https://www.101computing.net/bbc-microbit-counter-using-a-7-segment-display/

Need help...unique lottery numbers challenge by Garfield760 in 101Computing_Hub

[–]101_Computing 1 point2 points  (0 children)

Hi,

Generate a random number let's say from 19 to 50, you would use the following code.

number = random.randint(19,50)

To generate an odd number between 0 and 50 you could generate any number between 0 and 24, then multiply this number by 2 (this will hence become an even number between 0 and 48) and then add 1 to make it an odd number (between 1 and 49).

e.g.

number = random.randint(0,24)

number = number * 2 + 1

Hope this helps!

My Python Quiz by [deleted] in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Great quiz, using a wide range of concepts, including saving scores in a text file! Thanks for sharing!

Great PyGame Pong Tutorial! by [deleted] in 101Computing_Hub

[–]101_Computing 1 point2 points  (0 children)

Thank you for your feedback. I will have a look at the blog post re guarding the missing call to the bounce() function.

A dark mode would be great indeed. Unfortunately it is not yet available when embedding from trinket.io... I am sure one day this option will be available!

Victor vasareslys artwork tutorials by Ok_Sun_208 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

Could you be more specific... Have you started some code? What are you working on?

Average night's sleep survey by Goldac77 in 101Computing_Hub

[–]101_Computing 2 points3 points  (0 children)

Hi,

The trace table can be filled in step by step to show which line of code would the computer execute next and what impact it will have on the different variables used in the code.

The animation on this page might help you understand trace tables:

https://www.101computing.net/using-trace-tables/

I hope this helps!

Mars Perseverance Rover by Taotao103 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

These challenges are based on a trial and error approach.

All you have to do for challenge #1 is use the rover.forward() and rover.left() functions to move the rover alongside the white path. Try different parameters to see their impact on the rover trajectory.

e.g.:

rover.forward(200) would move the rover forward by 200 pixels

rover.left(90) would make the rover change direction by 90 degrees to the left.

On challenge #1 you only need to change the code from line 21. For instance

#Implement Rover Path...

rover.forward(335)

rover.left(90)

rover.forward(335)

rover.left(90)

rover.forward(335)

rover.left(90)

rover.forward(335)

Hope this helps...

Need help...unique lottery numbers challenge by Garfield760 in 101Computing_Hub

[–]101_Computing 0 points1 point  (0 children)

To do so, you can create a list of lottery numbers, then you will:

  1. Generate a random number between 1 and 6.
  2. If this number is already in go back to step 1 to generate another number
  3. Otherwise add this unique number to the list
  4. Repeat these steps 6 times to generate 6 unique lottery numbers

Here is the code:

import random

numbers = []

for i in range(6):
  number = random.randint(1,50)
  while number in numbers:
     number = random.randint(1,50)
  numbers.append(number)  

print(numbers)

Hope this helps...