@Ramiels That's just repl.it. It's not his fault.
It's kinda unethical. However I am not saying that you can't do this, I just want to say it's unethical and that I was going to make this comment yesterday, but I wasn't able to put it in terms of words.
It doesn't make sense to try to gain extra cycles from people who just want an answer. I understand you want cycles- but for what? You don't earn money from cycles, do you? Will you put it in you resume? No. It's just reputation, like stackoverflow. But unlike stackoverflow, there is no losing cycles from unhelpful answers. So even if you had a lot of cycles, people won't even respect you- you didn't do actual work to deserve it.
I'm not saying this to be rude, but I hope you understand.
I always wanted to do something like this. Looks like someone beat me to it :)
Of course! ...
Next time search up your question BEFORE you ask in post.
Wait a minute...
Did you do this in a Repl Team? If not you should port your code over and use the Admin CI to enter that team in the jam.
I really like the Repl DB. My only issue is key size limits.
Also, please add the ability to view the Database!
Creative mode needed. Feels like MC lite :) (The Nostalgia)
That's really cool @MohamadAlshabab!
But you can achieve this goal in a much easier and efficient way. Instead of using the unpacking operator
*, slice the list using a negative index. This tells python to read right to left. So
digits[-2] should give you the second-to-last character or the tens digit (same applies to ones:
digits[-1] should give you the last character). This also fixes a bug where your code thinks that the tens place is the hundred place.
If your code is unfinished, you will automatically reach an EOF
@IzanLarumbe Here's a quick rundown of a cycle:
A cycle is how many times someone upvoted your post or comment, or if you answered someone's question. (I believe it's like Reddit karma?)
Now that I have answered your question,
Do you have a link to your repl? Are you using the built-in audio library?
It's very nice! (I think it kinda looks like a giant ipad)
The only issue I could say is it's a bit clunky, but a job well done!
Oh do you mean the typing effect? It's definitely possible, but instead of import os, use import sys.
For more information, check out this stack overflow:
I used it for my games when I was a newbie :)
console.log("Java is Better"); or
print("Python is Better")
Java has a messy syntax (in my opinion), where all the tiny things yell out errors. Python is a more straight forward approach that is friendly for anyone. Recognizable functions such as
str() will help you know which command is which.
import time time.sleep(4) num = input("What is your favorite number?") if num == 7: print("That's my favorite number too!") else: print("Nice!")
Start learning Python today!
On line 31 in
commands_displ = colored("COMMANDS:
You are missing an end quote
" and a end parenthesis
Also, on line 1 in variable
You have a long string that has the save and load game functionality. This string is vulnerable to code errors, as Repl.it treats it like a string. Like how you made
game.py, create a file called
savegame.py and create functions for loading, saving, or deleting the save game.
edit: Hmmm..... It seems you were trying to create a multiline statement on line 31 in
game.py. You must have forgotten to add 2 extra quotes to make it into a multiline.
"""This multiline statement is important for adding the extra line"""
Now that everything is working again, we need to conclude what happened so we don't make that mistake again.
First, we need to use
""" instead of
""" creates a multiline string which can output in multiple lines. We could also use
multi = """ Hello World! I am a multiline string! What about you? """ #multiline print('Look Up,\nLook Down') #give a multiline
Look Up, Look Down
Second, we shouldn't put all our code in a multiline string, as Repl can't detect code errors.
Third, we need to organize code into functions and classes which will help us understand the code. It's also nice to document it with
def load(): #loads savegame """ This load function loads savegame. Very Important Piece of the Game. Some errors on line 10 """ #loading print('Loaded!') #show msg when complete q = 1/0 #hmmm..... this seems to return an error.
Did it help? Mark this as the correct answer
I chose T-Series :) [ T-Series' Power should be Bollywood music. ]