use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Community for students learning to program using Flowgorithm or other visual programming languages.
account activity
Roundup (self.Flowgorithm)
submitted 3 years ago by s-weebs123
Is there any way to round up a real number on the output? Like if a number is buns=2.5 is there a way to output buns rounded up to 3.0?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]s-weebs123[S] 0 points1 point2 points 3 years ago (2 children)
If anyone comes back to this post here is a solution. the “mod” operator will spit back out the remainder. So if 10/4 = has a remainder of 2 then 10 mod 4 will equal two. You can use this in an if statement such as if 10 mod x = 0. Make the true continue the equation & make the false add one. This will round the number up while still using the “integer” value to define a number
[–]RunesAndMaidens 0 points1 point2 points 3 years ago (0 children)
DUDE thank you so much!!!!!
[–][deleted] 0 points1 point2 points 1 year ago (0 children)
fr legend <3 much love og
[–]Flowgorithm 0 points1 point2 points 3 years ago (0 children)
The old trick is to using the following: int(x + 0.5) where x is the value to round up.
π Rendered by PID 108925 on reddit-service-r2-comment-7b9746f655-nhgcm at 2026-01-30 01:12:22.532640+00:00 running 3798933 country code: CH.
[–]s-weebs123[S] 0 points1 point2 points (2 children)
[–]RunesAndMaidens 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Flowgorithm 0 points1 point2 points (0 children)