Skip to content

Comments

Cedar - Kristin L.#77

Open
Kbhlee2121 wants to merge 2 commits intoAda-C16:masterfrom
Kbhlee2121:master
Open

Cedar - Kristin L.#77
Kbhlee2121 wants to merge 2 commits intoAda-C16:masterfrom
Kbhlee2121:master

Conversation

@Kbhlee2121
Copy link

No description provided.

Copy link

@kaidamasaki kaidamasaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

One small comment but other than that everything looks good!

Comment on lines +6 to +11
new_movie = {}
if title and genre and rating:
new_movie["title"] = title
new_movie["genre"] = genre
new_movie["rating"] = rating
return new_movie

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's cleaner (and less typing) if you build the dictionary all at once:

Suggested change
new_movie = {}
if title and genre and rating:
new_movie["title"] = title
new_movie["genre"] = genre
new_movie["rating"] = rating
return new_movie
if title and genre and rating:
new_movie = {
"title": title,
"genre": genre,
"rating": rating
}
return new_movie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants