Owen Bradstreet
@OwenBradstreet
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.
Any idea when this will be added? Will be fantastically appreciated :)
So I want to generate a random number, for example between 1-100. I want the probability of 100 being generated to be way more likely than 1, going up
haakenlid How about this: 101 - math.floor(101 ** random.random())
It will give some sort of inverse logarithmic distribution.5 years ago
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 :)5 years ago
I know that Cyclomatic Complexity is the number of different routes the user can take through code after a certain point (correct me if I'm wrong), bu
SeamusDonahue for me it starts on line 314 of my program where I reset a variable to ensure that the next while loop will trigger (this is nested in a while loop). it says my complexity is 89. I don't doubt that but does it matter?3 years ago
BlueBari21 import colorama as cr
cr.init(autoreset=True)
print("MOS Kern v1.4 Beta, \n by MI Software \n(c) 2019 Matthew_ink.")
usr_load = open("Users", "r")
usrread = usrload.read()
#-------------------Login-----------------------------
usr_try = input("Username: ")
while usrtry != usrread:
print(f"{cr.Fore.RED}\nIncorrect.")
usr_try = input("Username: ")
if usrtry == usrread:
print(f"{cr.Fore.GREEN}\nCorrect.")
pass_load = open("Password", "r")
passread = passload.read()
pass_try3 years ago
There are two modes in this hangman! Either you play as the guesser (1), guessing the word the computer has chosen.
Or you can let the AI play as the
AlexandrosTzanopoulos Cool stuff! But, I think I found a bug:
The word was "Protect" and when I entered "t" it didn't fill both of them.
image5 years ago
OwenBradstreet Now with an even larger library of words, about 100,000. This means a wider range of vocabulary for the first mode, but a bit longer load times on the second. :)5 years ago
https://repl.it/@OwenBradstreet/Text-Editor
I started and finished this in two hours - leading me to believe there's probably some bugs I'm overlooki
Alexbot isn't sentient, or at all intelligent - but you can train him! Fork the bot and have a go - see how intelligent you can make your Alexbot!
ht
OwenBradstreet Be sure to run the tutorial too - it explains the basics. Commands can be added in the if statements on line 74 - if you're good enough ;)5 years ago
When will we be able to chat with others? Sometimes I've been on people's profiles and wanted to start up some sort of chat with them about a piece of
This isn't an actual classroom. This is an area for intermediate to advanced python 3 programmers to complete challenges and even earn awards.
Please
Babbel just started developing my chatbot! i have already some ideas for bonus features ;)5 years ago
timmy_i_chen Oh nice! You might get a bunch of people joining! Did you know you can give people a link to the community classroom so they can take your class without actually joining the classroom? The link is found by clicking on the "community" link on your teacher dashboard (top right corner)5 years ago