#๐ Please someone put a list into my code that has meaning i need it for my project and no AI please
49 messages ยท Page 1 of 1 (latest)
@half sparrow
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
one sec i have to explain something
that is chatgbt and sadly my teacher doesnt like that that is removed
whats removed?
the entire list (start of list middle of it and end)
what list?
looking at your code, there's nothing to indicate that the list is removed in any or entire part of it
๐คทโโ๏ธ
let me send you the code in one sec
share it here in code format
!code format instructions below
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
so i cant just paste the code in
count = 0
while count < 3:# These lines of code was assaisted by ai [Chatgpt](lines 1,2,32-37)."
print("Please enter whole numbers only!")
first_num = int(input("Please enter your first number?:"))
second_num = int(input("Please enter your second number?:"))
operator_choice = input("Which operator would you like to use?:(add, subtract, divide, or multiply): ")
def multiply():
print(first_num * second_num)
def adding():
print(first_num + second_num)
def subtract():
print(first_num - second_num)
def divide():
print(first_num / second_num)
if operator_choice == "multiply":
print("".join([str(first_num), " * ", str(second_num), " = ", str(first_num * second_num)]))
multiply()
elif operator_choice == "add":
print("".join([str(first_num), " + ", str(second_num), " = ", str(first_num + second_num)]))
adding()
elif operator_choice == "subtract":
print("".join([str(first_num), " - ", str(second_num), " = ", str(first_num - second_num)]))
subtract()
elif operator_choice == "divide":
print("".join([str(first_num), " / ", str(second_num), " = ", str(first_num / second_num)]))
divide()
else:
print("Sorry, I think the operator is invalid.")
count += 1
if count < 3:
restart = input("Do you want to start again? (yes/no): ")
if restart.lower() != 'yes':
break
Hey @half sparrow!
It looks like you're trying to paste code into this channel.
Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.
To do this, use the following method:
```py
print('Hello, world!')
```
This will result in the following:
print('Hello, world!')```
You can **edit your original message** to correct your code block.
and make sure its wrapped in "py "
"count = 0
while count < 3:# These lines of code was assaisted by ai [Chatgpt](lines 1,2,32-37)."
print("Please enter whole numbers only!")
first_num = int(input("Please enter your first number?:"))
second_num = int(input("Please enter your second number?:"))
operator_choice = input("Which operator would you like to use?:(add, subtract, divide, or multiply): ")
def multiply():
print(first_num * second_num)
def adding():
print(first_num + second_num)
def subtract():
print(first_num - second_num)
def divide():
print(first_num / second_num)
if operator_choice == "multiply":
print("".join([str(first_num), " * ", str(second_num), " = ", str(first_num * second_num)]))
multiply()
elif operator_choice == "add":
print("".join([str(first_num), " + ", str(second_num), " = ", str(first_num + second_num)]))
adding()
elif operator_choice == "subtract":
print("".join([str(first_num), " - ", str(second_num), " = ", str(first_num - second_num)]))
subtract()
elif operator_choice == "divide":
print("".join([str(first_num), " / ", str(second_num), " = ", str(first_num / second_num)]))
divide()
else:
print("Sorry, I think the operator is invalid.")
count += 1
if count < 3:
restart = input("Do you want to start again? (yes/no): ")
if restart.lower() != 'yes':
break
"
Like read that โ๏ธ
backticks are below the ESC key and left of the 1 key
"'count = 0
while count < 3:# These lines of code was assaisted by ai [Chatgpt](lines 1,2,32-37)."
print("Please enter whole numbers only!")
first_num = int(input("Please enter your first number?:"))
second_num = int(input("Please enter your second number?:"))
operator_choice = input("Which operator would you like to use?:(add, subtract, divide, or multiply): ")
def multiply():
print(first_num * second_num)
def adding():
print(first_num + second_num)
def subtract():
print(first_num - second_num)
def divide():
print(first_num / second_num)
if operator_choice == "multiply":
print("".join([str(first_num), " * ", str(second_num), " = ", str(first_num * second_num)]))
multiply()
elif operator_choice == "add":
print("".join([str(first_num), " + ", str(second_num), " = ", str(first_num + second_num)]))
adding()
elif operator_choice == "subtract":
print("".join([str(first_num), " - ", str(second_num), " = ", str(first_num - second_num)]))
subtract()
elif operator_choice == "divide":
print("".join([str(first_num), " / ", str(second_num), " = ", str(first_num / second_num)]))
divide()
else:
print("Sorry, I think the operator is invalid.")
count += 1
if count < 3:
restart = input("Do you want to start again? (yes/no): ")
if restart.lower() != 'yes':
break
"'
` ๐ that's a backtick
` count = 0
while count < 3:# These lines of code was assaisted by ai [Chatgpt](lines 1,2,32-37)."
print("Please enter whole numbers only!")
first_num = int(input("Please enter your first number?:"))
second_num = int(input("Please enter your second number?:"))
operator_choice = input("Which operator would you like to use?:(add, subtract, divide, or multiply): ")
def multiply():
print(first_num * second_num)
def adding():
print(first_num + second_num)
def subtract():
print(first_num - second_num)
def divide():
print(first_num / second_num)
if operator_choice == "multiply":
print("".join([str(first_num), " * ", str(second_num), " = ", str(first_num * second_num)]))
multiply()
elif operator_choice == "add":
print("".join([str(first_num), " + ", str(second_num), " = ", str(first_num + second_num)]))
adding()
elif operator_choice == "subtract":
print("".join([str(first_num), " - ", str(second_num), " = ", str(first_num - second_num)]))
subtract()
elif operator_choice == "divide":
print("".join([str(first_num), " / ", str(second_num), " = ", str(first_num / second_num)]))
divide()
else:
print("Sorry, I think the operator is invalid.")
count += 1
if count < 3:
restart = input("Do you want to start again? (yes/no): ")
if restart.lower() != 'yes':
break
`
there
ok and?
what happened to these codes?
I took the orignal copy, the code i just sent is the correct one sorry
no worrys can you send someone else over?
we're not paid to do this. its volunteers
so if anyone comes by and willing to help, they will
thank you every much
just make sure to explain properly. More info you have and willing to put in the effort, the more they can help you
I am making a AI project were in the code a list must be included, I am lost on were to put a list
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.