Python Forum
Autonomous Python Script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autonomous Python Script
#1
good evening,

May I ask for your help again?
Quote:Create a plural.py script, capable of taking several words and displaying their plural.

Example:

$several.py dog, cat, bird
dogs
cats
birds

The script must be used in the terminal.

so far I wrote:
def several(a,b,c):
    plural_a=a+'s'
    plural_b=b+'s'
    plural_c=c+'s'

    print( plural_a+"\n",plural_b+"\n",plural_c+"\n")
several('cat','dog','camel')
And it works.
but somehow I can't launch it from my terminal.
I'm on Ubuntu.
the script is in the main directory
I used chmod +x several.py to make the script executable from the terminal
yet nothin happens -> is my script wrong?
Reply


Messages In This Thread
Autonomous Python Script - by Leyo - Mar-31-2022, 08:03 PM
RE: Autonomous Python Script - by Axel_Erfurt - Mar-31-2022, 08:21 PM
RE: Autonomous Python Script - by deanhystad - Mar-31-2022, 08:23 PM
RE: Autonomous Python Script - by Leyo - Apr-01-2022, 07:27 AM
RE: Autonomous Python Script - by Axel_Erfurt - Apr-01-2022, 09:16 AM
RE: Autonomous Python Script - by ibreeden - Apr-01-2022, 08:24 AM
RE: Autonomous Python Script - by Axel_Erfurt - Apr-01-2022, 09:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Re-write BASH script to Python script popi75 5 2,609 Apr-30-2021, 03:52 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020