Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements or Suggestions @for all #2

Open
udaykumaruking opened this issue Jan 15, 2021 · 0 comments
Open

Improvements or Suggestions @for all #2

udaykumaruking opened this issue Jan 15, 2021 · 0 comments

Comments

@udaykumaruking
Copy link
Member

FizzBuzz

  • Use ternary operators and decrease size of the code.
  • Take use input insted of giving input directly in code.

Max of Two

  • Use trenary operators
  • Def should not be in middle of the code, It works fine but its a pattern followed by developers

Prime

  • Use eratosthenes sieve method for finding prime number it will help you a lot.

Even and Odd

  • Use ternary operator

Speed

  • Speed won't be in integers it will be in float

Sum of three and five

  • Instead of using elif use logical or .

Missing Number

  • in for loop instead of using len funtion we can directly iterate the list.

Guessing Number

  • While importing any package use as keyword.

** Get Max**

  • Instead of using if and else you can use direct max funtion present in python.
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

No branches or pull requests

1 participant