Giter Site home page Giter Site logo

hackbrightacademy / tech-interview-prep Goto Github PK

View Code? Open in Web Editor NEW
13.0 12.0 16.0 237 KB

๐ŸŽโœจ How to prep for Hackbright's technical admissions interview!

Home Page: https://hackbrightacademy.com/software-engineering-program/

License: Other

Python 52.59% JavaScript 47.41%
hackbright bootcamp admissions practice-questions python javascript

tech-interview-prep's People

Contributors

atrnh avatar mearajennifer avatar poemusica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tech-interview-prep's Issues

Current Solution Debug

In the current solution code, the function goes over the first number of the list and return the result based only on that first number. This code needs to be in a while loop to make sure it keeps iterating over each number on the list and return based on the total count of even or odds.

def get_even_or_odds(numbers):
count_even = 0
count_odd = 0

while True:
    for num in numbers:
        if num % 2 == 0:
            count_even = count_even + 1
        
        elif num % 2 != 0:
            count_odd = count_odd + 1
        
    if count_even > count_odd:
        return "Even"
        
    elif count_odd > count_even:
        return "Odd"
        
    else:
        return "Even and odd"

num_list = [1, 2, 3, 4, 5, 6, 7, 8, 10]

print(get_even_or_odds(num_list))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.