hacker

Kotcho Lacoste

@LimanData (31)
I didn't have name ideas, okay? >:c
since I am in quarantine what should i make?
posted to Ask by xolyon

you should make

children

since I am in quarantine what should i make?
posted to Ask by xolyon

@xolyon Apps for my Benzene OS!

Why is the health not going down
posted to Ask by xolyon

Hm. Try declaring variables right after you make them global, or else it may not reassign them.

how do i make a string index
posted to Ask by miab2553

studentNames = ["Jin", "Tobias"]
print(studentNames[1])

You should get Tobias.

Just separate each name with a comma and a space.

Can repl.it be a hosting for a website ? If yes how ?
posted to Ask by Spiered

@malvoliothegood Thanks! I've now got it up and running.

Benzene OS 11
posted to Share by LimanData

That's what I was thinking, use different files. @ApoorvAgrawal

How do I understand Repl.it
posted to Ask by IshaNair

I see you're into Python. That's a good start for using repl.it, it's a very readable language!
You could try running files from different folders, importing modules, making a calculator, etc.
https://docs.repl.it/ is a good place to go for any questions about the site itself.

Can repl.it be a hosting for a website ? If yes how ?
posted to Ask by Spiered

@malvoliothegood I'm definitely interested... How would I go about hosting a website on repl.it?

How to run a file under new fold.
posted to Ask by choisangyeon

When you want to call a file from a different folder use 'from [folder] import [file]'. Here's an example based off of your program:
https://repl.it/@LimanData/WhisperedFreshFields

how do you work java
posted to Ask by Zacheeto

Java isn't the most readable language for beginners. If you're just starting, I recommend Python before moving to higher-level languages. It helps to have a bit of a background first. :)

i need help
posted to Ask by godfatherofcode

Did you write a program yet?

I want my python repo to be shown graphcally when someone access it vai the link
posted to Ask by millah

Click on the icon in the upper right. It opens your repl.
Copy that link and paste it. That should take them right to it.
Example:
https://benzene-100.limandata.repl.run/
This takes you right to the program.

line 7 is reading invalid syntax error.. hlep
posted to Ask by D41090321

The print statement should not be capitalized as well.

At Home Students Code Jam
posted to Announcements by 21natzil

69 comments.

Nice.

Python chatbot
posted to Share by xolyon

Yes, I agree to follow these fules.

Python OS 0.1.2 released
posted to Share by LimanData

@adityaru I just rolled out the stable version of this a minute ago, by the way. And sure, I'll join in just a bit.

Python OS 0.1.2 released
posted to Share by LimanData

@adityaru I'd be willing to. What do you have in mind?

Python OS 0.1.2 released
posted to Share by LimanData

@IreoluwaRaufu Will do. I'm new-ish to Python, thanks for the tip!

Pass generator not working
posted to Ask

Hm, not sure. The syntax looks very similar to Python. I'll look it over.
Check line 5 (obviously). Perhaps there is an issue with matching the random integer to items in the list?

how to share on gmail
posted to Ask by slynchtcssh

turtle won't work
posted to Ask by skulcoach

What exactly are you trying to do here? The only problem I noticed right off the bat was the period after "turtle". That period is telling Python to treat "turtle" as a dependency. Which, of course, it is, but nothing comes after the period, throwing a syntax error. If you were to put, say, "talk" after the period, you would get "'turtle' has no attribute 'talk'". This tells you that turtle, in that case, is a dependency. This code, as of now, is assigning turtle to a variable called MyTurtle.

Or it was just a simple typo.

Of course, I've never used Turtle. There could be differences between Python 3 syntax and Turtle syntax. But this is just my best guess.

Python OS 0.1.2 released
posted to Share by LimanData

@LiamDonohue Thancc! This code is still pretty clunky, I hope to clean it up soon.

why it always says moduled named ramdom,if the ramdom is there i am confused can someone help me
posted to Ask by EiraMin

Here is the corrected version:

import random
computer_choice=random.randint(1,3)
comp_wins = 0
player_wins = 0

def Choose_Option():
user_choice = input("Choose Rock, Paper or Scissors: ")
if user_choice in ["Rock", "rock", "r", "R"]:
user_choice = "r"
elif user_choice in ["Paper", "paper", "p", "P"]:
user_choice = "p"
elif user_choice in ["Scissors", "scissors", "s", "S"]:
user_choice = "s"
else:
print("I don't understand, try again.")
Choose_Option()
return user_choice

def Computer_Option():
comp_choice = random.randint(1,3)
if comp_choice == 1:
comp_choice = "r"
elif comp_choice == 2:
comp_choice = "p"
else:
comp_choice = "s"
return comp_choice

while True:
print("")

user_choice = Choose_Option()
comp_choice = Computer_Option()

print("")

if user_choice == "r":
    if comp_choice == "r":
        print("You chose rock. The computer chose rock. You tied.")
    
    elif comp_choice == "p":
        print("You chose rock. The computer chose paper. You lose.")
        comp_wins += 1
        
    elif comp_choice == "s":
        print("You chose rock. The computer chose scissors. You win.")
        player_wins += 1

elif user_choice == "p":
    if comp_choice == "r":
        print("You chose paper. The computer chose rock. You win.")
        player_wins += 1
    
    elif comp_choice == "p":
        print("You chose paper. The computer chose paper. You tied.")
        
        
    elif comp_choice == "s":
        print("You chose paper. The computer chose scissors. You lose.")
        comp_wins += 1

elif user_choice == "s":
    if comp_choice == "r":
        print("You chose scissors. The computer chose rock. You lose.")
        comp_wins += 1
    
    elif comp_choice == "p":
        print("You chose scissors. The computer chose paper. You win.")
        player_wins += 1
        
    elif comp_choice == "s":
        print("You chose scissors. The computer chose scissors. You tied.")

print("")
print("Player wins: " + str(player_wins))
print("Computer wins: " + str(comp_wins))
print("")

user_choice = input("Do you want to play again? (y/n)")
if user_choice in ["Y", "y", "yes", "Yes"]:
    pass
elif user_choice in ["N", "n", "no", "No"]:
    break
else:
    break
why it always says moduled named ramdom,if the ramdom is there i am confused can someone help me
posted to Ask by EiraMin

The module is named "random" instead of "ramdom".

dice game help
posted to Share by Saoxddd

@CodeLongAndPros I wonder if that's the issue.