Thanks so much. You've been a great help.
You have confirmed that the lecture's question is flawed.
Appreciate the help.
Regards
Vusa
On Thu, Feb 9, 2017 at 12:02 PM, Alan Gauld via Tutor
wrote:
> On 09/02/17 09:25, Vusa Moyo wrote:
>
> > class Cat:
> > n
iskers"
kind = "Burmese cat"
color = "grey"
value = 3000.00
When I run this command, I still receive the same error.
print(Cat1.description())
Please assist where possible.
Regards
Vusa
On Wed, Feb 8, 2017 at 11:06 AM, Alan Gauld via Tutor
wrote:
> On
I have a suspicion my lecturer's question is flawed, so I'd like to pose it
to you guys to confirm my suspicions.
Here goes..
I've gone and created a Class Cat1(cat): <-- inherited class, but cant seem
get the code right which allows the test code to run successfully.
We have a class defined for
lowed me to append the subprocess output to my list.
Thanks for the help everyone :-)
On Mon, Nov 16, 2015 at 3:07 PM, Vusa Moyo wrote:
> The following code seems to be pointing me to the right direction, BUT, my
> list has 0's instead of the output generated.
>
> >>> for i
print $1}'" % pids[i]], shell=True))
...
60772
106112
3168
13108
14876
8028
3328
8016
139424
6037524
5570492
4128
144364
154980
154980
>>> pmap_str
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
I;m assuming the zero's are exit codes, which then populate the list, which
is not wha
Hi Guys,
OS = SuSE Enterprise Linux
Python V2.7
My code is as follows
# this list contains system process ID's
pidst=[1232, 4543, 12009]
pmap_str=[]
command="pmap -d %s | grep private |awk '{print $1}' | awk -FK '{print $1}'"
for i in range(len(pids)):
pmap_str.append(os.popen("(command) %
Thanks Meenu.
str.translate.
Worked like a charm for python 3.5.
And thanks Alan Gauld for the 2.7 version.
Appreciate the help guys. You guys are awesome.
Regards
Vusa
On Wed, Oct 28, 2015 at 6:23 PM, meenu ravi wrote:
> Hi Vusa,
>
> I was not able to reply through mail list due to some
Hi Guys,
I've written a script to remove vowels from a string/sentence.
the while loop I'm using below is to take care of duplicate vowels found in
a sentence, ie
anti_vowel('The cow moos louder than the frog')
It works, but obviously its messy and n00by. Any suggestions on how I can
write this
= [lloyd, alice, tyler]
print(get_class_average(students))
bother = get_class_average([lloyd, alice, tyler])
print(get_letter_grade(bother))
=
Appreciate it.
Regards
Vusa
On Thu, Oct 22, 2015 at 11:14 AM, Alan Gauld
wrote:
> On 22/10/15 10:03, Vusa Moyo wrote:
>
>> Hi Guys. Tha
, alice, tyler]
print(get_class_average(students))
bother = get_class_average([lloyd, alice, tyler])
print(get_letter_grade(bother))
Worked like a charm.
Thanks for the assistance.
Regards
Vusa
On Tue, Oct 20, 2015 at 2:38 PM, Alan Gauld
wrote:
> On 20/10/15 12:29, Vusa Moyo wrote:
>
Hi there. My script is as follows,
lloyd = {
"name": "Lloyd",
"homework": [90.0, 97.0, 75.0, 92.0],
"quizzes": [88.0, 40.0, 94.0],
"tests": [75.0, 90.0]
}
alice = {
"name": "Alice",
"homework": [100.0, 92.0, 98.0, 100.0],
"quizzes": [82.0, 83.0, 91.0],
"tests": [89.
11 matches
Mail list logo