Skip to content

Improvements or Suggestions @for all #2

Open
@udaykumaruking

Description

@udaykumaruking

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions