#I need help ;-;

7 messages · Page 1 of 1 (latest)

hot tulip
#

So basically I have a homework which asks me to create a program that needs to solve cuadratic ecuations and that’s pretty much it, however something technical I want to do just for fun is for the program to be able to repeat itself if the user needs it.

The thing is: at the start of the code I type def main():
And in the end of the code I put this:
Repeat = input(“Would you like to do another excercise? “)

If Repeat == “yes”:
main()

Else:
print(“Thank you!”)

And for SOME REASON when I put yes it only shows Thank you! And closes when I watched 2 different yt vids that did work with the def thingy…
Help please 🥺🙏
(The homework is done this is just for fun and to learn, I just can’t find the solution)
Btw this is #python I’m using vscode…

alpine comet
#

!format

delicate siloBOT
#
Code Formatting

When sharing code with the community, please use the correct formatting for ease of readability.

Example

```py
YOUR CODE HERE
```

Those are back ticks not single quotes, typically the key above TAB

alpine comet
#

If you share your code, we'll be able to figure out why it's not working

strange glen
#

yes

delicate siloBOT
#

@hot tulip

File Attachments Not Allowed

For safety reasons we do not allow files with certain file extensions.

olakhease Said

now my problem is idk how to use the while in this situation

Code Formatting

You can share your code using triple backticks like this:
```
YOUR CODE
```

Large Portions of Code

For longer scripts use Hastebin or GitHub Gists and share the link here

Ignored these files due to them having disallowed file extensions
  • Ecuacion_Cuadratica.py
#

@hot tulip

File Attachments Not Allowed

For safety reasons we do not allow files with certain file extensions.

Code Formatting

You can share your code using triple backticks like this:
```
YOUR CODE
```

Large Portions of Code

For longer scripts use Hastebin or GitHub Gists and share the link here

Ignored these files due to them having disallowed file extensions
  • Ecuacion_Cuadratica.py