-
Notifications
You must be signed in to change notification settings - Fork 126
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
base: main
Are you sure you want to change the base?
solutions-from-ex-17-to-31 #2982
Conversation
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 }') |
There was a problem hiding this comment.
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) | ||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
No description provided.