Comments (3)
Floor division differs from regular division when one of the numbers in division is a floating point:
print (7.5//-3)
print(7.5/-3)
-3.0
-2.5
I would think of it (//) as
floor(a/b)
from 2nd-semester-introduction-to-computer-science-principles.
We don't reproduce this issue: When we do "7/-3" we get -2.5. Are you sure you're using Python 3?
from 2nd-semester-introduction-to-computer-science-principles.
I get two different results:
normanbauer:~/workspace (master) $ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
print (7//-3)
-3
print (7/3)
2.3333333333333335
In the file mode under Cloud9:
print (7//-3)
print(7/-3)
produces:
Your code is running at https://demo-project-normanbauer.c9users.io.
Important: use os.getenv(PORT, 8080) as the port and os.getenv(IP, 0.0.0.0) as the host in your scripts!
-3
-3
Looks like there is a difference between interactive and file mode.
from 2nd-semester-introduction-to-computer-science-principles.
Related Issues (20)
- Associated Readings Unit 5 and 6 really refer to Units 6 and 7 of the Python material HOT 1
- Solution to Kangaroo class lab 7.03 HOT 1
- Lab 1.03 clarification HOT 1
- Use of wireframe in Do Now 8.01 HOT 2
- Lesson 8.01 - TEALS can provide a few samples if needed.
- Missing () in Terminal and Cloud 9 Cheat Sheet HOT 1
- Do we really want to teach globals in Lesson 3.04? HOT 2
- Unclear ask in lab 4.04 HOT 1
- Lesson 1.03 has 3 parts but time for 2 parts in the pacing guide. HOT 1
- DoNow 5.01 has out of date link. HOT 1
- Add examples of Python2 vs Python3 differences to Introduction page HOT 1
- 5.02 instructs to read Unit 2, then asks about beat strings, which are not covered HOT 1
- Project 1.06 MadLibs project spec needs more instruction HOT 1
- Lab 7.04: is Water Type supposed to override growl()? HOT 1
- Lab 7.04: need clarification on attack effectiveness
- Lab 2.04, #2 (triangle) Should specify longest side for right triangle check
- Oregon trail needs more explanation of "Correctly add_days and update_days functions" HOT 1
- Project could be test driven instead of user driven HOT 1
- Could we not require waterfall for the final project?
- Lab 7.04 needs more instructions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 2nd-semester-introduction-to-computer-science-principles.