Owen Bradstreet

@OwenBradstreet (87) • UTC Portsmouth
I dabble in a few languages, but I am most proficient in Python 3. I endeavour to create the most complex, but efficiently written programs.
A Crash Course in LOLCODE 🐱
posted to Learn by minermaniac447

This is a great tutorial, covering most of the language.
LOLCODE can be hard to understand, I think you explained it quite well. You have my upvote!

Brute Force Password Cracker
posted to Share by CyanCoding

Hey dude. I'm not here to take a dump on your work, I can tell you spent a while making this, and it seems functional - I just wanted to give you some advice. A lot of this code could have been done way more efficiently, and it's very hard on the eyes. I have rewritten two of the excessively inefficient and hard to look at parts for you (Those if's with all the or's), you can take inspiration from it if you would like.

I hope this helps you out man.

PS - The parts I have rewritten can be distinguished by the large comments around the scripts. I completely fine with you flat out copying these scripts, I only ask you chuck some sort of comment somewhere saying I helped out. Thanks man.

https://repl.it/@OwenBradstreet/Brute-Force-Password-Cracker

Cyclomatic Complexity too high?
posted to Ask by OwenBradstreet

@amasad I don't have an example that wouldn't fill a page haha, but 15 or more nested if's yes (not all under one if statement, nested within eachother). Why is 15 too high though? As in, what disadvantage or issues does it cause?

👋✨Introduce yourself 🎉😀
posted to Announcements by amasad

Hi!

I'm Owen, and although I'm not new to repl.it I'm very new to the forum part - and I've been very active recently, I love it! I program in Python 3, and (not to blow my own trumpet) I think I'm pretty good. I use repl.it so I can code on my chromebook, and now for this awesome community!
I really hope to become well-known and liked here!

  • Owen
Brute Force Password Cracker
posted to Share by CyanCoding

@OwenBradstreet PS: I got 450 milliseconds reaction time on your Reaction Test :) I think I'm pretty good.

Game Tutorial: Canyon Runner
posted to Learn by ericqweinstein

I got 3048 - pretty proud too :P Anyone higher?
Also, nice work and tutorial dude, well organised.

Code doesn't run
posted to Ask by GabrieleRomagno

@GabrieleRomagno When you create the new file, are you adding the extension (.py) to the end? If not, it will just be a blank file format.

PS: If this is helpful can you upvote? Thanks!

CREATE Your Future: A Choose Your Own Path Game!
posted to Share by CindyLin070902

I didn't enjoy this... I chose to make my own character and then be a unicorn, and it just said 'yay'. The ascii art was cool but it wasn't much of a future? The other's weren't much more interesting.

I'm not here to take s*** on your work man, just thought I'd give some honest feedback - maybe add some more story?

Is it possible to use python's socket library in repl.it?
posted to Ask by ETHANSIAO

@21natzil How would you go about connecting to the server from another repl?

Working Memory Tutorial
posted to Share

@IEATPYTHON

Sorry, my fault

import replit
replit.clear()

Announcing Universal Package Manager
posted to Announcements by amasad

Awesome!

Random Numbers with Arbitrary Probability Distribution (Python 3)
posted to Ask by OwenBradstreet

So, thanks to the brilliant mind of timchen, the solution is as simple as:

import random

accuracy = int(input("Accuracy (1-100): "))
randomNumber = random.randint(1,101)
if accuracy > randomNumber:
    print("Hit!")
else:
    print("Miss!")

Awesome community here :)

Code doesn't run
posted to Ask by GabrieleRomagno

I found this to happen sometimes too. An easy fix is to just close your browser and reopen it, and use CTRL+SHIFT+T to open your old pages again - seems to work. Hope this helped.

I am such a noob at this...
posted to Ask by beanthexenoxide

There are two types of loop: Definite and Indefinite.
Definite loops have a certain ending - they will definitely end at some point.
Indefinite loops can end, but don't necessarily have to.

The while loop will execute some code over and over again indefinitely while a condition is met. For example:

x = 0
while (x < 10):
    #Do some things here
    x += 1

This will execute the code 11 times, because x starts at zero and increments by one each time, and while loop will loop indefinitely until x isn't less than 10. Another example code be:

while (True):
     # Doing some cool things forever here
     if (youwantto):
          break

This code will run forever, unless the loop is broken from the inside using break.

The For loop will take a list and execute the code for each item in that list. For example:

names = ["Owen Bradstreet", "Taya Fitzgerald", "Jerry Smith", "John Doe"]
for name in names:
     print(name)

This code will go through every item in the "names" list, replace the temporary variable "name" with the current name it's on and print out that name. The for loop is often used to run some code a certain amount of time like this:

for i in range(0, 9):
     # Cool code here

This will execute that code 10 times.

Hope this helped!
Owen

PS: If this did help you, can you please leave an upvote :) This took me a while to write.

Tic-Tac-Toe
posted to Share by PYer

Ideas/suggestions on making repl.it even better
posted to Ask by Babbel

@Babbel I like this idea a lot - this would allow us to create our own leaderboards and stuff!

hide and seek
posted to Share by fortnitemaster

Add a link?

1,000,000 Line MMO
posted to Share by Lumpy_Wiggles

@Lumpy_Wiggles I left it on overnight and I managed to complete your game! Quite proud of myself.

Survive and Hunt
posted to Share by khani16

https://repl.it/ibuiltthis/games/Survive-and-Hunt/4920

This is the earliest original I could find. I believe this guy made it, he's had the repl for over a month. Please don't plagiarise khani it's not cool..

Survive and Hunt
posted to Share by khani16

I don't think you make this - please at least give reference to the actual creator and say it isn't yours.
I want to clarify I don't think you made this because it says the repl was made 4 hours ago - I don't think you wrote that in 4 hours, and I've seen it before.

Let me know if I'm wrong - apologies if I am.
Owen

House (from python with turtle)
posted to Share by Rasum

Maybe add the link to the program so we can try it out, instead of just a screenshot?

Owen

TicTacToe for Two
posted to Share by ChrisHill

Pretty cool man - maybe work on that AI as an extra feature and ask at the beginning if you want to play two or one player?

Competition Classroom
posted to Ask by OwenBradstreet

I look forward to it! @Babbel

Competition Classroom
posted to Ask by OwenBradstreet

The first project has been set! Join the class and start your submission!

Working Chatroom
posted to Share by pyelias

This is really cool - was just thinking that instead of saying the chat it is on the left, instead say the time it was sent. This would make it easier when determining if people are still online or not.

Have a problem with only this IDE.
posted to Ask by thongth

@pyelias You can also set the flush argument to true flush=True inside the print, which forces the terminal to buffer after each one :)

Working Memory Tutorial
posted to Share

import replit
replit.clear

Use that to clear the screen.

July Competition: Create Multiplayer Games
posted to Share by timmy_i_chen

Does it have to be visual, and does it have to be in node.js / web-based?

Is there a way to become root on here?
posted to Ask by Elitemagikarp

@timmy_i_chen That's a no then ;)

whats the best coding language to learn?
posted to Ask by mmcdermotttcsp

I'd recommend python. It's easy to learn and gives a basic grasp of programming, which will help you when/if you move on to different languages.