2

I keep running into a _stdout error with a print statement within the browser IDE provided by Pearson, yet the error does not occur when using Wing 101 IDE. I need the print statement to only output each variable (an integer(k), a double(d), and a string (s) respectively) in the order s, d, k and k, d, s on separate lines.

What I have below prints: "number: number: name: sam 4.0 3 3 4.0 sam" I only need it to print the value of the three variables. Can someone help me understand why I am getting this error or why it is printing the prompts and values?

k = int(input("number: ")) d = float(input("number: ")) s = str(input("name: ")) print(s, d, k) print(k, d, s)

The error message I get from Pearson's IDE: Expected Output: _stdout.txt:·"21.666666666666668 Actual Output: _stdout.txt:·"How·old·is·Josh?·How·old·is·Cindy?·My·age·is:·21.666666666666668↵

Kait
  • 37
  • 4
  • I can not reproduce your error. `number: 5 number: 4 name: 3` output: `3 4.0 5` – ohlr Feb 23 '19 at 17:18
  • can you post a link to the IDE you are using. I believe that is the issue. – ohlr Feb 23 '19 at 17:24
  • I don't believe I can since it's through my college. It's within the MyLabProgramming through Pearson. I know it's very fickle with submissions too: I if I don't match what it's looking for character for character, it marks it wrong entirely. – Kait Feb 23 '19 at 17:27

1 Answers1

0

Since your code is correct and only gives an error for the special ide you are using you might try the following:

k = int(input())
d = float(input())
s = str(input())
print(s, d, k)
ohlr
  • 1,839
  • 1
  • 13
  • 29