function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chaitanyakuamar Teruchaitanyakuamar Teru 

apex map print

# create a map
chirutha          -     ramcharan
magadheer     -     ramcharan
orange            -     ramcharan
billa                 -     prabhas 
bhahuballi       -     prabhas 
mirchi              -     prabhas 

#Data having be like
moviename    -    rating       -       collection 
chirutha          -     3             -       12cr
magadheer     -     4             -       75cr
orange            -     2             -       12cr
billa                 -     3             -       30cr
bhahuballi       -     4             -       1000cr
mirchi              -     4             -       50cr

# output will be like
   
we have to print like: Ramcharan acted in '3' movies .2 movies (chirutha , magadheera) hit with a collection of (12+75)=(87cr). 1 movie(orange) will be flop with the collection of (12cr).
# similar to the second one (prabahas)
hint : here movie rating between 1-2  declare as (flop), 3 will be declare as (average), 4& above will be declare as (hit)


# output :
actor name + total movies  + hit movie names & collection + avg movie name & collections + flop movie name & collections .
# output will be like in bellow format
ex : ram charan +total movies (3) + (chirutha,magadheera) hit movie collection (87cr) + no avg movie fr ramcharan + (orange) flop movie collection (12cr).