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

Python: Division #73

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

shakeel0581
Copy link

Task
The provided code stub reads two integers, a and b, from STDIN.

Add logic to print two lines. The first line should contain the result of integer division, a //b . The second line should contain the result of float division, a / b.

No rounding or formatting is necessary.

Example
a = 3
b = 5

The result of the integer division 3//5 = 0.
The result of the float division is 3/5 = 0.6.

Print:
0
0.6

Return the greatest of the four integers.

Functions are a bunch of statements glued together. A function is provided with zero or more arguments, and it executes the statements on it. Based on the return type, it either returns nothing (void) or something
The provided code stub reads two integers, a and , bfrom STDIN.

Add logic to print two lines. The first line should contain the result of integer division, a // b. The second line should contain the result of float division,  a/b .
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

Successfully merging this pull request may close these issues.

1 participant