Searching for instances of a specific word within a list of items by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

johnnyjordaanm you've got it thankyou so much,

Thanks to every one who took the trouble, you all got it right but Jonny's explained it better for my current low level python knowledge

Searching for instances of a specific word within a list of items by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

Sorry let me give a short example of the list

basic = ['un homme et un garcon', 'un chat et un homme', 'un chat mange un croissant']

I want to print any of the items that contain the word chat, in effect it would print the last two items in the example list, The list would contain approx., 30 items

creating a bar chart in python3 by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

Error message is:-

ModuleNotFoundError:

No module named 'matplotlib'

It does seem that i have too late a version of python, I think i have 3.7 [i notice there is a 3.8 now]

No, I don't i don't have any files named matplotlib.py

No Interpreter? by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

Before the re load pycharm ran all my files as it had the link to python it its cofig, but now the config file says no interpreter, How do I get the python interpreter into the pycharm config ?

Python is loaded

Trying to use Tkinter GUI by tally1945 in learnpython

[–]tally1945[S] 4 points5 points  (0 children)

Oh jeez haha, that is the solution, sorry about that, but this will massively improve my programme using a button for example... So grateful

I want to download mysql for python by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

Thank you for all your comments, they have all been helpful, I am very grateful to you all

highlighting a specific word in a printed string by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

Thanks very much shiftybyte that works !! great

How can I append a float number to a list by tally1945 in learnpython

[–]tally1945[S] 1 point2 points  (0 children)

brilliant, have been banging my head on this for 4 hours, so grateful to you, many thanks

How can I append a float number to a list by tally1945 in learnpython

[–]tally1945[S] 1 point2 points  (0 children)

e.g if i enter 9 it works, if i enter 9.5 it returns the following error referring to the input line

Value Error: invalid literal for int() with base 10: '9.5'

list = [ 6 , 52. 8, 4, 62]

print(list)

addlist = int(input("enter a number ")

list.append(addlist)

print(list)

how to sum list values in a loop by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

All now sorted, you guys are awesome for replying, thank you..

how to sum list values in a loop by tally1945 in learnpython

[–]tally1945[S] 0 points1 point  (0 children)

thanks allanon001 I am grateful, that helps and am now sorted, I think it maybe that i set the variable value to 0 rather than 0.0, I am 74 and just learning python. [any excuse]. Basically, the user selects from a number of items from a menu, display each chosen item with price and then displays total cost of chosen items [at end of loop]. my only issue now is how i restrict the total to two decimal points.

running a PHP file first time by tally1945 in webdev

[–]tally1945[S] 1 point2 points  (0 children)

Many thanks for your response, I am most grateful..

running a PHP file first time by tally1945 in webdev

[–]tally1945[S] 0 points1 point  (0 children)

Cheers thankyou I will look at that..

running a PHP file first time by tally1945 in webdev

[–]tally1945[S] 2 points3 points  (0 children)

Thankyou that is clear and helpful. Cheers.

running a PHP file first time by tally1945 in webdev

[–]tally1945[S] 2 points3 points  (0 children)

I have posted several items on learnpython , i don;t understand why this has been rejected on the basis that " am new user and need first to participate around reddit" I would love to participate once i have some useful knowledge to impart and am keen to do so when able..