#input function
Explore tagged Tumblr posts
helloworldletscode · 8 months ago
Text
Data types and input function
Programs use input to do certain work, and in order to receive it from another user, we can use the input function.
The input() function always turns the user input into a string, no matter which type of data was originally put into it.
Example:
cost_of_living=input() #user may write down an answer print(type(cost_of_living)) #to specify the data type of the input user has given
answer: <class 'str'> = string
But! You can't do math with strings, so sometimes we need to convert existing data type of a value.
cost= input() #default data type is a string cost=int(cost) #converts into integer cost=float(cost) #converts into float cost=str(cost) #back to string
Side notes: 1. You cannot convert any type of value to an integer or the float, only numeric values!
cost= "one hundred" cost=int(cost) #would result into an error
while:
cost= "100" cost=int(cost) #would convert string into an integer, as desired
2. Another important thing to remember, is that when we are creating a value as an integer, we use quotes "".
But in order to convert a variable into a string, we have to use a function str().
apples = 2 print("apples") # prints "apples", not the string with value 2 apples = str(apples) print(type(apples)) #<class 'str'> print(apples) #2
0 notes
my-autism-adhd-blog · 1 year ago
Text
ADHD & Autism
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
The Autistic Teacher
572 notes · View notes
lylahammar · 1 year ago
Text
does anyone else feel like they become neurotypical while they're in the shower
172 notes · View notes
creepyscritches · 3 months ago
Text
Ngl monster hunter wilds is one of the most frustrating UIs and command entry systems I've used. I mean, I GET that it's a long established series so people are familiar with the setup, but it is genuinely a mark of shit setup if there is no real tutorial on how to use the system if you have no prev mh experience :/
Radial menu heal commands are just gaslighting at this point. 3 - 5 attempts to get the input to actually register mid-battle.....caca ass layout 🙃
24 notes · View notes
biinaberry · 5 months ago
Text
Tumblr media Tumblr media
We can all admit that binghe would make a terrifying hal right?
48 notes · View notes
onesidedradiostatic · 1 year ago
Note
Hear me out
Transfem alastor
Thoughts?
Tumblr media
I mean honestly live your dreams anons I'm open to any of these hcs but I wanna be transparent that I am a #cis girl, gender stuff isn't really my Area of Expertise since it doesn't fit under my experiences as a cis person
that being said, transfem alastor, kinda real, hated men so much he said actually fuck being one
and I could see the vees' one, not much to say here (vox does canonically get hard but I respect the energy here. although one could question how hell works in reincarnating you when you die, if you're trans and want your gender's biological parts will it give it to you. although arguably vox IS part tech so maybe he... alright I will stop this line of thought)
75 notes · View notes
synthaphone · 17 days ago
Text
my ridiculous massive spreadsheet projects for logging every pokemon i own and recording every fusion ive made in cassette beasts are dangerous, because theyre really good at making me FEEL like im being productive- like omg im accomplishing so much, im checking off boxes im filling the spreadsheet!!!! but im not actually accomplishing anything meaningful. theyre a kind of like art in a way, where the art is in the process of completing them for the sake of it? but its not the kind of thing thats worth anything to anyone who isnt me.
honestly i think theyre fine enough hobby activities its just like. obsessively entering useless data into spreadsheets definitely eats up the time i could be spending drawing or doing something creative
12 notes · View notes
bagalois · 4 months ago
Text
as a student, you gain hope when you go to office hours and get answers, and you go through the stages of grief when you submit homework and get feedback.
as a teacher, you gain hope when you host office hours and give advice, and you go through the stages of grief when you grade homework and subject yourself to human stupidity.
14 notes · View notes
gotyouanyway · 2 months ago
Text
they should make it less scary
16 notes · View notes
uncanny-tranny · 2 years ago
Text
It's really freeing when you learn that rationality isn't going to be feasible in the long run, not because rationality is this thing that only Truly Enlightened people get the privilege to experience, but because humans are just irrational.
You can know when you're being irrational, and sometimes, it is in big ways. But pretending like that irrationality doesn't exist or can only exist if you're "stupid" only sets you back from growing. Irrationality is part of the human condition - it is impossible to actually be this enlightened person people like to project themselves onto.
96 notes · View notes
lunarsyskids · 4 months ago
Text
Do any other systems write stories about daily interactions between alters?
Our inner world can be very vivid or very loose. It just depends. And so our memories of what we do there can also be really wishy-washy. I know I have two moms, but lately I’ve been feeling a bigger and bigger disconnect bc they only exist in the inner world and I don’t remember our interactions as much…
Is this a normal thing? Or are we faking having DID??? Because I’m worried this means we aren’t real because other systems talk a lot about their lives in their inner worlds and their interpersonal interactions and sometimes we have that but most of the time we don’t…
12 notes · View notes
my-autism-adhd-blog · 1 year ago
Text
ADHD vs, Autism
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
The Autistic Teacher
394 notes · View notes
majorshatterandhare · 2 years ago
Text
GPTim having both visual and hearing disabilities is so important to me. That man’s eyes were *burned out* when he *exploded the moon* his hearing is gonna be affected also; and having functional accessibility aids (his mechanical eyes, here) does not equal not disabled, it just means that the disability manifests differently.
120 notes · View notes
pokemondetector · 5 months ago
Note
How does your thing work??? I thought at first you were reading the post in as a string and doing like a key-dictionary thing to match a pattern with a Pokémon name but it didn’t do it with the Ask containing the pokérap. I am v curious and would love to hear about it if you have time
Pokemon detected :
How does your thing work??? I thought at first you were reading the post in as a string and doing like a key-dictionary thing to match a pattern with a Pokémon name but it didn’t do it with the Ask containing the pokérap. I am v curious and would love to hear about it if you have time
Tumblr media
Ralts !
13 notes · View notes
hawnks · 5 months ago
Text
Caleb's arm not being able to feel anything is really psyching me out tho
7 notes · View notes
jelliegirl · 4 months ago
Text
several of my friends who have national parks or other government jobs have gotten fired because of this dumbfuck administration its really fucking infuriating
6 notes · View notes