KarmaIsADick
@KarmaIsADick
image
I'm lost. No matter what, it always does this. Please help.
Coder100 hi, there are several errors.
You forgot a ) on line 9
time.sleep(int(duration))
You added an extra , on line 3
duration = input("Enter duration")
You added an extra = on line 4
true == "1"
`2 years ago
InvisibleOne You have some issues.
Line 3 has a , that shouldn't be there
Line 4 should be true = "1" double == are only for comparing things
Line 9 needs a closing parentheses2 years ago
Basically, it is supposed to reply to a comment from a post it finds in a subreddit with a key term, stored in a list of variables. Except, once it fi
I'm making a Reddit bot. I want it to reply to a comment mentioning it's username with a random fact for a band I like, but it always returns the same
SixBeeps You're only choosing a random number at the beginning of your code. From there on out, it doesn't pick another. There are a few ways of fixing this:
You could copy line 11 and lines 14-19 into the if statement between lines 24 and 25, which will pick a new fact with your current method.
A better solution would be to make a list of facts, then call the random class' choice() method on that list so that you don't have to make a bunch of if statements.2 years ago
So, I see on a lot of websites, such as Microsoft, Discord and Google, that when you scroll down on their webpages stuff just quickly fades in our of
Coder100 Here's an easy tutorial: https://cssanimation.rocks/scroll-animations/
also nice pun
2 years ago
Hello. So, my website has a list of pages, but the pages can only support one line of text. If we go over that, then it messes up the page. One fix is
notGilbert Use the HTML title attribute
This is some text blah blah
https://developer.mozilla.org/en-US/docs/web/html/global_attributes/title2 years ago
8
Hello, I am building a website which I expect, once it is launched, will eventually need more storage than Replit can provide for it. It is easier to
xfinnbar You host a database somewhere else if you need to store normal data types (strings, ints, ect.). If you need to store files then your best bet would probably be to edit in replit and copy it to somewhere else. GitHub integration may help with this.2 years ago
We all know being a programmer is tough. Why not give yourself some motivation with this random quote generator, made with Python?
Quotes from Austra
Python
Back when the new Microsoft Edge was launched, I was excited not because there would be a new rival for Google Chrome, but because I wanted to see if
HTML, CSS, JS
KarmaIsADick Oops, some of my bullet points are in italics, because I'm not very good with markdown. Please forgive me!2 years ago
image
So here, I have a script from the internet. But when I open the webpage, nothing has changed.
If you need to see the full webpage script, let m
Coder100 That is a library file.
You must use some more code to actually get the lib to do what you want it to do.
https://valine.js.org/en/index.html2 years ago
EpicGamer007 you need to actually use the script. just adding it will not do anything, its a library, you need to specify what you want to do with it. also you can get rid of the type="text/javascript"2 years ago
I'm building an anime review website, but it looks unprofessional as after all the the different pages (such as 'allpages'), it has .html (allpages.h
CodingCactus hi, it's quite simple actually, there are two options
1. Folders
make folders called what you want the page to be called, and inside that have a page called index.html and when you try and go to the name of the folder, it will return the index.html file, but with the name of the folder
index.html
otherpage
|_ index.html
cactuspage
|_ index.html
If you go to /otherpage it will render the html in otherpage/index.html, but the url will just be /otherpage (same for cactuspage)
2. backend
Now this2 years ago
tussiez Hello!
You can
I know how to do this in nginx (replace suffix): https://stackoverflow.com/questions/38228393/nginx-remove-html-extension
Probably not in Repl.it though..2 years ago
Your task:
Write a top 10 list of your favourite films, and display it. Set it as a variable, or however you choose so you can complete the next part.
Python
Hello, I have a text file, and my program needs to print a number of words the user specifies (out of 100 paragraphs). I also need to know how I can g
Python
RYANTADIPARTHI Solution
use slicing, like this.
something = "something"
print(something[0:2])
use it in your will.
Try that. It should work.2 years ago
Coder100 words = "hello world"
print(len(words.split(" ")))
as you can see that will give you 2, because there are two words2 years ago
KHZ @bennyrobert If you want to print the anything from the start you can use this code and replace __ with the name of the variable you want to print:
f = open("file.txt", "r")
sentences = f.split("\n")
words = file.split()
noofwords = int(input())
for i in range(noofwords):
print (__)
`2 years ago
Hi, I'm new to HTML and am building a basic website. I've created a css script, but it only applies to my homepage (index.html), and all the other pag
tussiez How
Add a reference to the CSS in the ``
Hmm, I learned to use type="text/css", and everyone isn't. Is this unnecessary2 years ago
Coder100 just add that CSS to all the websites.
see this?
this links your css to your html file. Add this to all your html files, but it won't work in folders. If you want it to work in folders,
`2 years ago