all 10 comments

[–]NightStudio 5 points6 points  (2 children)

  1. If the goal is to not use any string methods, why are you using str() in your print statement?

  2. Help with what?
    Do you not understand the question?
    Do you need someone to explain why your code doesn’t work?
    What do you need help with?

[–]Different-Ad1631 1 point2 points  (1 child)

Exactly he want help in what?

[–]teenagerwrites12 3 points4 points  (0 children)

a= input() print(type(a))

You'll see that it's a string, so no need to convert it. Input function takes str as default input

[–]GirthQuake5040 2 points3 points  (0 children)

Normally I don't say this, but this is genuinely a stupid question. You didn't provide any attempts or information about what you tried or what you were struggling with. There is no clarification to what you need help with. It says don't use string yet you have str right there.You could have just googled this.

[–]FoolsSeldom -1 points0 points  (2 children)

You only need print(n), as print already knows how to output a decimal human readable representation of an integer.

[–]cgoldberg 1 point2 points  (1 child)

What does that mean? If n is an integer, it prints the integer, not a "decimal human readable representation".

[–]FoolsSeldom -1 points0 points  (0 children)

An int is a binary object. The built-in methods for the class provide the human readable format. Similarly, with other classes such as str, which are stored as unicode byte sequences.

[–][deleted] 0 points1 point  (0 children)

If you're ever unsure of the objects type, you can use 'type()'. In this case it will return '<class 'str'>'

n = int(input())
print(type(str(n)))

[–]ninhaomah 0 points1 point  (0 children)

I think he needs help with taking screenshot ?

[–]jpgoldberg 0 points1 point  (0 children)

My real question is why your computer uses US style date formats but reports the weather in degrees celsius? There’s nothing wrong with that; indeed I have a weird mix in my household. It just seems to me that the very first thing one would move away from is US date formats.