Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solutions-from-ex-17-to-31 #2982

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dan90git
Copy link
Contributor

@Dan90git Dan90git commented Mar 7, 2023

No description provided.

for i in np.arange(4.95,29.95,5):
discount = (round(i,2) * 60) / 100
discounted_price = round((round(i,2) - (round(i,2) * 60) / 100),2)
print(f'The original price was {round(i,2)}, the discount is 60%, equal to {discount} and the new price is {discounted_price }')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend re-implementing it without using numpy.

print(f"{i} fizz! buzz!")
else:
print(i)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend optimizing redundant code.

index = ALPHABET.index(e)
new_message += ALPHABET[index + number]

print(new_message)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend trying to use (input) numbers greater than 60.
If there are errors, how could you fix the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants