Skip to content
Sign UpLog In
Profile icon

Anon ymous

@Ardin16
Repls
Community
Ardin16
Ardin16
shared a Post
2 years ago
How do i get the option to only run if the options number is put in?
What i have right now is: if (choice = "1"); System.out.println(one + two); if (choice = "2"); System.out.println(one - two); if (choic
Random3
Java
EpicGamer007
EpicGamer007
if you want to compare strings, you have to use .equals() and not == so change it to if (choice.equals("1")) { System.out.println(one + two); }, etc2 years ago
Ardin16
Ardin16
shared a Post
2 years ago
(maybe limit to 1 spaces between parts as well so it can only take First Last) Ex of what i'm tryng to get, What is your username? First Last User
Basics
Java
InvisibleOne
InvisibleOne
Is there a way you can split it into a list and then take the first and second part of the list?2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
it don't think you can ask input for two values at once, but what do you mean by the second part?2 years ago
Ardin16
Ardin16
Ok, i got the multi word to print, but now how do i get it to be on the same line as the quetion?2 years ago
Ardin16
Ardin16
shared a Post
2 years ago
option_list = ["add", "subtract", "multiply", "divide"] #^^ list^^ option = input("Do you want to add,subtract, multiply, or divide? Choice: ") #^^ or
Python Calculator
Python
Coder100
Coder100
you are adding an unnecessary if statement on line 6 which will always evaluate to false because your loop is trying to fix that, that is why it is not running correctly. https://repl.it/@Coder100/solution-for-ardin-mark-as-correct-answer-please#main.py2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Solution add a break statement. Once the while loop has succeeded it's task, then add a break. It should work2 years ago
Ardin16
Ardin16
shared a Post
2 years ago
im looking at different tutorials that say how but all are either windows (which slightly changes the code by adding a (-n)) or have nothing to do wit
Python 3.8.2
Python
Ardin16
Ardin16
also srry bout the late replies to those who replied before this, the video i followed was this one https://www.youtube.com/watch?v=hDXT6dfTVBk&t=224s2 years ago
Coder100
Coder100
what do you mean ping IP? Do you mean making an HTTP request to a server of some sort?2 years ago
Ardin16
Ardin16
shared a Post
2 years ago
basically i cant get turn = input() list1 = "travel" if turn in list1 : print ("choose where travel") travel_country = input() if travel_country in
Codejira
Codejira
Hi, first you import a module like import turn. Note the absent file extension. You do so at the top of your main.py file. Put the code of turn.py in one or more functions and call them when needed. Improvements to `turn.py': Use input with a hint for the expected user input Use meaningful variable names Change list1 from string to list Initiate lst2 in turn.py as it is a local variable Indent code blocks properly Improved file turn.py: def main: turn = input("What next? (travel, ): ") old2 years ago
Ardin16
Ardin16
shared a Post
2 years ago
I'm trying to basically make a dnd game in code and am on the last bit, Turns. I have countries for maps, names for players, species, classes, but I d
Muffinlavania
Muffinlavania
umm i really dont know what you asked, what is it you want?2 years ago
Ardin16
Ardin16
shared a Post
2 years ago
one_member = ("1, one, One") team_name = input("What is your team name? Team name: " ) print() print ("Hello " + team_name + "! Welcome to your advent
Ardin16
Ardin16
How can i make a list limited in the number of spaces available depending on the integer input for the number of team members?2 years ago
Ardin16
Ardin16
shared a Post
2 years ago
how do i fix this? i have been looking into try except and other things but every time i use except or something else it gives me a python error or lo
Ardin16
Ardin16
this has been fixed2 years ago
Ardin16
Ardin16
basically i know how it is running the while loop, if the user species you give is in the list specified in species it will continue the code correctly however if you accidentally put elven instead of Elven or troll instead of Troll it will continue giving you invalid species even if you fix what you put in.2 years ago
thenullified
thenullified
your codes works fine. why are you asking? What is your name? Hello ! What is your gender? Gender: You are a . Elven, Troll, Human, or Dark Elven? What species do you wish to be? Species: Troll Species: Troll  or did you mean something else...?2 years ago
Ardin16
Ardin16
shared a Post
3 years ago
How do you get this to add something to "cart" and then print everything added to "cart" by printing it all under "checkout"?
Projects
Python
Roar123
Roar123
In your case, the cart represents a list because it is storing items. To initialize it, add cart = [] Next, we have to ask the user for some items to add to the cart. Let's have them enter space separated values or whatever you want. add_items = input("Add items to cart (separated by spaces): ") Finally, we need to get the items by using split() on our input. Splits at every occurrence of " " items = add_items.split(" ") Now, create a for loop to append these values to cart. for item in items: 3 years ago
BlueComet
BlueComet
I forked your repl and tweeked it I think this is what you want if its not then tell me heres the link https://repl.it/@iterate/Projects3 years ago
Ardin16
Ardin16
shared a Post
3 years ago
i have terminal, and console for text results, but nothing for forward(100) to go to Screenshot 2020-04-19 at 21.31.54
ash15khng
ash15khng
You need to use a python with turtle repl: https://repl.it/languages/python_turtle 3 years ago
Ardin16
Ardin16
shared a Post
3 years ago
ex. (grouping symbols, exponents, mult/div, add/sub)
Roar123
Roar123
Python follows order of operations by default3 years ago
Ardin16
Ardin16
no repl just question3 years ago
Ardin16
Ardin16
shared a Post
3 years ago
is anybody able to translate this from one language to another or english (run it to get something that isn't quite english)
runes.py
Python
staticvoidliam7
staticvoidliam7
wouldn't that be called psuedocode?3 years ago
Ardin16
Ardin16
shared a Post
3 years ago
attempted rune-script translation for LP