0

I'm writing a program for my intro to scripting class that is supposed to divide user_num by x 3 times.

here is my code:

user_num = int(input())
x = int(input())

import math

num1 = user_num / x
num2 = num1 / x
output = math.trunc(user_num / x), math.trunc(num1 / x), math.trunc(num2 / x)

print(output)

Say that input was 200, output looks like this:

(100, 50, 25) 

which is all fine and dandy, except for the grading program in my course expects the output to have no commas or parentheses

100 50 25

I've tried using output.replace(',', ' ') as well as output.strip(',') to no avail.

TheFaultInOurStars
  • 3,464
  • 1
  • 8
  • 29

0 Answers0