#๐Ÿ”’ 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)

digital ploverBOT
#

@half sparrow

Python help channel opened

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.

vestal geyser
#

you already have a list in your code

#

operations_history = []

#

smh

half sparrow
#

that is chatgbt and sadly my teacher doesnt like that that is removed

half sparrow
#

the entire list (start of list middle of it and end)

vestal geyser
#

what list?

#

looking at your code, there's nothing to indicate that the list is removed in any or entire part of it

#

๐Ÿคทโ€โ™‚๏ธ

half sparrow
vestal geyser
#

!code format instructions below

digital ploverBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

vestal geyser
#

Or if its too long use a pastebin

#

!paste instructions below

digital ploverBOT
#
Pasting large amounts of code

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.

half sparrow
#

so i cant just paste the code in

vestal geyser
#

you can

#

if its not too long

half sparrow
#

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
digital ploverBOT
#

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.
vestal geyser
#

and make sure its wrapped in "py "

half sparrow
#

"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

"

vestal geyser
#

backticks are below the ESC key and left of the 1 key

half sparrow
#

"'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

"'

vestal geyser
#

` ๐Ÿ‘ˆ that's a backtick

half sparrow
#

` 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

vestal geyser
#

ok and?

half sparrow
#

how could I add a list in there

#

in that code

#

in any way

vestal geyser
#

what happened to these codes?

half sparrow
#

I took the orignal copy, the code i just sent is the correct one sorry

vestal geyser
#

ah shoot I gtg.

#

sorry

half sparrow
#

no worrys can you send someone else over?

vestal geyser
half sparrow
#

My apologys

#

My bad*

vestal geyser
#

so if anyone comes by and willing to help, they will

half sparrow
#

thank you every much

vestal geyser
#

just make sure to explain properly. More info you have and willing to put in the effort, the more they can help you

half sparrow
#

I am making a AI project were in the code a list must be included, I am lost on were to put a list

digital ploverBOT
#
Python help channel closed

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.