Thank you for installing the modules of ROS Code.
The installation adds these (view unminified) files in a folder called ros in your Python site-packages directory.
You can use any commands exposed in that directory
Here's an example:
This is how you'd normally check if a number is a prime one.
You'd have to create a new function and add a docstring so Python will recognize it when a user executes the pydoc command.
Then you'll need to ask for the user's input and execute the command.
def isprime(number):
"""
Check if a number is a prime number
number:
The number to check
"""
if number == 1:
return False
for i in range(2, int(number**0.5) + 1):
if number % i == 0:
return False
return True
if isprime(input("Enter a number to check for prime: ")):
print("It is prime!")
else:
print("It isn't prime!")
With ROS Code, you can simplify this task:
from ros.main import isprime
if isprime(input("Enter a number to check for prime: ")):
print("It is prime!")
else:
print("It isn't prime!")
You can find more tasks which you can simplify related to maths, strings and more here.
Metadata
Release files for ros-code-modules 2.0.0.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ros-code-modules-2.0.0.24.tar.gz | 11.4 kB | Without provenance | Details for ros-code-modules-2.0.0.24.tar.gz |
Release files / ros-code-modules-2.0.0.24.tar.gz
| Download URL | ros-code-modules-2.0.0.24.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f609654a3905150717e97c66a3b9f6e44171905c885bd9eeb5f0051fae04440c
|
|
BLAKE2b-256 checksum How to use checksums |
b97971fc097b04eca620ff8264553af7ca74960f46156519c5d0a04b5595a2d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
|
Security for ros-code-modules 2.0.0.24
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.