-
Notifications
You must be signed in to change notification settings - Fork 69
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
arrays_beyza_saridas.py #17
base: master
Are you sure you want to change the base?
Conversation
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.
There are certain rules about the function name. Also you need to remove that prints to the standard output. Just keep the function.
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 have added some comments for you to modify your code.
arrays_beyza_saridas.py
Outdated
if m < 0: | ||
raise ValueError(" m should be greater than 0") | ||
|
||
Random_array = np.random.randint(0, 10 ** d, size=(n, n)) |
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.
Follow the conventions for the variable names that we have mentioned in the lab.
arrays_beyza_saridas.py
Outdated
|
||
Random_array = np.random.randint(0, 10 ** d, size=(n, n)) | ||
print("Original Array:") | ||
print(Random_array) |
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.
Remove the lines that you have used print
.
arrays_beyza_saridas.py
Outdated
Random_array[start_idx:end_idx, start_idx:end_idx] = -1 | ||
|
||
print("Modified Array:") | ||
print(Random_array) |
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.
Remove the lines that you have used print
.
arrays_beyza_saridas.py
Outdated
create_modified_array(3, 4, 2) | ||
# Test with m > n | ||
except ValueError as e: | ||
print(f" {e}") |
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.
Remove this try
block completely or put this in a if __name__ == "__main__"
block to prevent running automatically.
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.
Remove the lines that are using print
.
No description provided.