Skip to content
← Back to Community
i want to recommend movie
Profile icon
withPinkkkyy

if user input genre/type of movie they will show title of movie and rating
i want to know how to write
i'm doing if they input genre that same in list_in(genre of movie) they will collect in the same list(genre[])

Voters
Profile icon
MarkHeikinen
Profile icon
withPinkkkyy
Comments
hotnewtop
Profile icon
peterparker211

If you're looking for dark humor, lowbrow Deez nuts joke, then you're in the right spot! Check out our Deez Nuts Jokes!

Profile icon
peterparker211

Out of so many Android apps, ThopTV APK is that application that provides unlimited movies and TV shows for free.

Profile icon
SheriGreene

Thank you for the great sharing, you can come to mod apk by modcombo to get free and safe games and apps.

Profile icon
finnegan

I am in dire need of a recommendation, I've been wanting to watch a movie for such a long time. Even the best ones I've found on 123movie haven't quite done the trick for me. So can anyone please recommend something?

Profile icon
LeticiaGarrett

Thanks for sharing, you can visit https://apkcima.com/ to learn about the code to fix the error.

Profile icon
zukenny

your code is really good and amazing and i will read it in the best way , really awesome https://apksunny.com/pk-xd/

Profile icon
MuhammadAli174

I actually used to make use of ThopTV not that long ago to satisfy all my entertainment needs. Then I came across soap2day and it has worked wonders. I've forgotten all the rest platforms now.

Profile icon
danclay

You can download OnMovies APK to download and recommend more movies for free.

Profile icon
danclay

Instead download Videobuddy APK and watch all movies for free.

Profile icon
APKsunnyMod

Thoptv is also a movie watching application that many people love, to be able to download and install please visit at: https://apksunny.com/thoptv/

Profile icon
PhilLongden

A simple loop to tidy this up:
for a in list_in:
if n == a:
genre.append(a)

this helps remove all of the elif statements that are making a mess :)

Profile icon
withPinkkkyy
Profile icon
Codejira

Some first thoughts:

  • Whenever you have a lot of repetitive code, it's time to consider loops and functions.
  • Line 5: str(input()) is redundant, as input() always returns str.
  • Line 7: genre = [] must go before the if statement.
  • Asking for the genres's name is error-prone.

My approach would involve a dictionary of number --> genre.
The input is so much simpler then, more so if you ask for multiple genres.

So much for now, HTH

Profile icon
withPinkkkyy
Profile icon
Codejira

I see you improved your code. Nice job, works fine!

I thought about the error-prone entering of genres and came up with a multiple choice module:
https://repl.it/@Codejira/Multiple-Choice

If you want to use it, remember that it always returns a list, even if there is only one option chosen.

@withPinkkkyy

Profile icon
withPinkkkyy

thank for your suggestion so much help me for my [email protected]

Profile icon
withPinkkkyy

i want to show type of movie for movie to user to choose
but my type of movie have too much how do i write? @Codejira

Profile icon
Codejira

I didn't know this was homework.
You should do most of it by yourself ;-)

If I get you right, you need to show more genres on one screen page?
I will think about it and improve the module.
Look out for it.

Edit:
I recommend printing your genres in columns.
Unfortunately there is no built-in function, so you have to figure it out for yourself.
Soon you will be able to get inspiration from my choice module.

Profile icon
withPinkkkyy
Profile icon
Codejira

So this is what I made it look like

Choose one or more movie genres by number | 1: Children & Family Mov|16: Independent Movies |31: Korean TV Shows | 2: Comedies |17: Romantic Movies |32: Science & Nature TV | 3: Stand-Up Comedy |18: Documentaries |33: Reality TV | 4: Kids TV |19: Horror Movies |34: Classic Movies | 5: Crime TV Shows |20: Music & Musicals |35: Sports Movies | 6: International TV Show|21: TV Dramas |36: Anime Features | 7: Sci-Fi & Fantasy |22: Romantic TV Shows |37: LGBTQ Movies | 8: International Movies |23: TV Comedies |38: British TV Shows | 9: Thrillers |24: Reality TV |39: Teen TV Shows |10: Spanish-Language TV S|25: Crime TV Shows |40: TV Mysteries |11: Docuseries |26: Stand-Up Comedy & Tal|41: Crime TV Shows |12: Science & Nature TV |27: TV Action & Adventure|42: Faith & Spirituality |13: Action & Adventure |28: Anime Series |43: Science & Nature TV |14: Dramas |29: TV Horror |44: Stand-Up Comedy |15: Cult Movies |30: TV Sci-Fi & Fantasy Enter space separated numbers: 1 6 10 26 The coices you made - Children & Family Movies - International TV Shows - Spanish-Language TV Shows - Stand-Up Comedy & Talk Shows
Profile icon
withPinkkkyy

thank you so much for help me but i run your code choose_multiple that not be found i can't run program @Codejira

Profile icon
Codejira

@withPinkkkyy I hope I understand you correctly.

If you don't see the files, find the document icon to the left. It says "Files" when the mouse pointer hovers over it. Click it to show the repl's files.

Click on the file columns.py to show the example code and learn how to use the module on your data.
Click on the file choose_multiple.py to show the code of the actual module.
Click on the file readme.md to show a formatted explanation / documentation.

Profile icon
withPinkkkyy

i mean i run your code choose_multiple in orther program
it can't run @Codejira

Profile icon
Codejira

@withPinkkkyy Oh, I see!
I can only guess what you are doing exactly, but this should work:

  • Go to my repl, open choose_multiple.pyand copy all the code.
  • Go to your repl, create a new file, name it choose_multiple.py and paste the code into it.
  • Open your file main.py and at the top add the line
    from choose_multiple import choose_multiple
  • Look into my readme.md or columns.py to learn how the module is to be used.

I just ran your program and noticed that you are importing matplotlib and numpy. They aren't used, are they? You better delete these imports then.

Profile icon
withPinkkkyy

thank! u can run my program now ,i import matplotlib and numpy.
for make plot i must make plot this program @Codejira

Profile icon
withPinkkkyy

in your choose_multiple.pt did you use dict or not
i am learning about your code @Codejira

Profile icon
Codejira

@withPinkkkyy Yes,there is a dict. It's just not obvious, as I took a short cut. Inspect line 42:
option = {num+1:opt for num, opt in enumerate(from_list)}

  • the new dict is called `option'
  • num+1:opt are the key:value pairs, with num starting at 0, but I want 1 as first key.
  • (num, opt) is a tuple returned by enumerate(). See documentation.

The notation with the curly brackets is called dict comprehension. It is a short cut for

option = dict() for num, opt in enumerate(some_list, start=1): option[num] = opt

Note: Looking at the documentation link above I just learned that enumerate has an optional start parameter, preferable to num+1.

Tip: Also look into list comprehension. A cool thing to have in your toolbox.

Profile icon
withPinkkkyy
Profile icon
GlanvilleSpears

Thank you for sharing. You can experience Rokkr, an application to watch TV and dramas that you will enjoy here: https://rokkrplus.com/