[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k] [s4s] [vip] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Home]
Board
Settings Home
/wsr/ - Worksafe Requests



Thread archived.
You cannot reply anymore.



File: Untitled.png (10 KB, 440x143)
10 KB
10 KB PNG
Hello programmers.

I am trying to figure out what is going on in this program, and I have a few questions.

def number_input(question):
answer = input(question)
number = int(answer)
return number

a = number_input('Write a!')
b = number_input('Write b!')
print('a + b =', a + b)

1. I define a function. Why is there an underscore between (number_input)?
>>
number_input is a function that returns a value from the keyboard as a variable a,b

underscores are cool, pirated audio from release groups were always lower case with underscores
>>
>>301243
>Why is there an underscore between (number_input)?
Just for ease of reading.
>>
I quote, there is also this way to have a good reading (camelCase)

getAnExample();




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.