Fion-ullister charles-kingston
@jeremykyleisgod
hello my name is Fion and I have unfortunate initials and I cant code unless following a tutorial and still find a way to mess it up
update: more broken then before(kinda) it itsnt giving me a syntax error but it isnt working i have a feeling it is indentation thing but I dont under
Python
RYANTADIPARTHI Try this.
def createclass():
while A = input("random villager: ah hello, I am here to gather
infomation from you. to start with would you say you where a
warrior or a strategist?input either strat or war this will help me
determine your characteristics young hero!"):
A = input("random villager: ah hello, I am here to gather
infomation from you. to start with would you say you where a
warrior or a strategist?input either strat or war this will
help me dete2 years ago
SixBeeps Try sticking line 52 inside of the while loop, and switching it from an or to an and2 years ago
jeremykyleisgod literally any help will be good my teacher has set me a tutorial to watch and I have but the code just doesn't want to work (as you could tell if you "played" it)
thanks in advance (unless you are here to tell me that it is simple then no i am not thanking you)
jeremykyleisgod2 years ago
for some reason it isnt working please can someone explain
Python
at the moment I am the only one of the group working on this and am probably the least experienced I would like to know how to loop code back to a lin
Python
AtriDey Next time, go to the Ask forum. The current problem is that there's no such thing as loop line. I have two solutions below.
The thing you described is a function, which is technically something most learn before input().
Here's an example:
#This is the function
def function():
input_variable=input()
print('This is the line of code you want.')
return input_variable
#Main body of code
print('Some code goes here')
#Now you need to call the function
function()
#The function has done its job 3 years ago
I am trying to make a code breaker game but I don't know how to find answers like I know the answer but if a random person finds it how do I get it to
Python
jeremykyleisgod @PYer I think I have added you to the coding group for code breaker but I am not sure3 years ago
jeremykyleisgod @PYer I am also planning to add a timer (countdown kinda thing) do you know how to do that3 years ago
PYer To check if a variable is equal to a string, write an if/else statement:
if : #code
else: #other code
guessed = input()
if answer==guessed:
do whatever it is you want to do (CORRECT)
else:
do the stuff when answer is wrong
Basically, the code asks the user for a guess and stores it in a variable called guessed. Then, with a simple if statement, it compares the answer variable to the guessed variable. If they are the same, then it runs whatever code you want to run when the answer is correct aft3 years ago
please feel free to talk to this stubborn piece of work that for some reason doesn't like talking (much like its creator)
do not use caps or spaces be
Python
Dont use spaces or any caps for your inputs also the words are good or bad for the first question and yes and no for the second do not use any other w
Python
jeremykyleisgod kinda sad only one person has used it I understand it is stupid but it took me at least 5 hours because I didn't know what I was doing probably longer than 5 atually3 years ago
CodingGoose you can do in the if else
if word.lower() or something like that. It will accept words with caps so3 years ago
jeremykyleisgod I know it isn't very good and there are many bugs but this is my first if else statement code hope you enjoy.3 years ago
I did this about 3-4 months ago and then it stopped working so I thought it was an issue with the repl so I created a new one and copied it over and i
Python (with Turtle)
I am relatively new to this and have decided to challenge myself. I am trying to write an "if" "else" statement but cant find the info I need (older v
Python
jeremykyleisgod NOW I HAVE THE PROBLEM OF YOU INPUT ON THE SAME LINE AS THE "how are you today" and if you press enter it just gives an auto response3 years ago