Author Topic: Programming Megathread  (Read 106434 times)

It was solved with "d = int(a)*int(b)" Thanks for the help though

addendum: you can multiply a string by an integer, it just adds the string to itself
so 'hi'*4 == 'hihihihi'

Well forget me again, ran into another problem that makes even less sense.

Code: [Select]
a = input("Enter tax rate: ")
b = input("Enter amount paid ")
c = input("Enter how many times paid ")
d = int(a)*int(b)\100
print(d + e)
'unexpected character after line continuation character' it goes away if I remove the \100

"line continuation character" == \
that is a backslash, bub
regular slash, /, is for division. backslash is for escaping

also don't stick everything so close together
int(a) * int(b) / 100 is 10x more readable than the alternative with no spaces

ALSO don't give your variables vague names like that. + some other small changes
revised entire thing:

tax_rate = int(input("Enter tax rate: "))
pay_rate = int(input("Enter amount paid "))
times_paid = int(input("Enter how many times paid "))
total_income = tax_rate * pay_rate / 100
print(total_income + e)


although honestly the whole thing doesn't make much sense. why are you dividing by 100? what is e?
« Last Edit: January 16, 2016, 11:11:08 AM by Foxscotch »

The e was a typo, and thanks for clearing that up.

HTML shoundn't be considered a programming language.

HTML shoundn't be considered a programming language.
cool because it isn't. it's a markup language. like, nobody calls HTML a programming language. it's not even in the OP so I'm not sure why you've said this


Because this.
Did I miss the part in the instructions where it said to leave a stupid comment?

Did I miss the part in the instructions where it said to leave a stupid comment?
Oh, hey, Otis. I didn't know you were still around. Good to see you!

Question, what is the most versatile language that I could learn as a beginner? I already know some Python but I don't know if that can really be used for what I want to do.

Does anyone know a good introduction to C#? I'd love to start using Unity, but I think i need to understand C# before i do that.

Does anyone know a good introduction to C#? I'd love to start using Unity, but I think i need to understand C# before i do that.

http://www.dotnetperls.com/
(for a start on C# and good reference)

http://catlikecoding.com/
(for learning Unity specific things).

The Microsoft site has a lot of things, too.

http://www.dotnetperls.com/
(for a start on C# and good reference)

http://catlikecoding.com/
(for learning Unity specific things).

The Microsoft site has a lot of things, too.
Thanks!

What about that new coding language from Apple, Swift?