Giter Site home page Giter Site logo

oim3640's People

Contributors

brianacampos avatar

Watchers

Zhi Li avatar  avatar

oim3640's Issues

Exercises in Session 08

def mysqrt(a):
"""
takes a as a parameter, chooses a reasonable value of x,
and returns an estimate of the square root of a.
"""
x= a/2
while True:
y = (x + a/x) / 2
if abs(y-x) < epsilon:
return y
break
x = y

Line 14 is unreachable.

Please take care of the inconsistent indentations issue.

Exercises in Session 09

while number_of_guesses < 6:
"""this functin will increase the number of guesses and output if their guess is too high or low
it will then break after the number of guesses has reached a limit of 6"""

  1. This is not how you define a function.
  2. where is number_of_guesses coming from?

Exercises in Session 05

d = b**2-4*a*c
if d < 0 :
print("This equation has no real solution")
elif d == 0:
x = (-b+math.sqrt(b**2-4*a*c))/2*a
print("This equation has one solution: "), x
else:
x1 = (-b+math.sqrt((b**2)-(4*(a*c))))/2*a
x2 = (-b+math.sqrt((b**2)-(4*(a*c))))/2*a
print("This equation has two solutions", x1, "or", x2)

This is not a function. You need to create function(s) for the exercises.

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.