Re: what happen with this python code?

2019-02-09 Thread AudioGames . net Forum — Developers room : Liam via Audiogames-reflector


  


Re: what happen with this python code?

Originally when I started learning Python I learned the .format method, but found it was too rigid if I wanted to quickly change a variable. Again. Totally personal preference. The good thing about Python and most any other language as you can accomplish the same task in several different ways.

URL: https://forum.audiogames.net/post/410612/#p410612




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: what happen with this python code?

2019-02-09 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: what happen with this python code?

@4, you can as well omit the index number. Something like this would  also work, but I don't know if it will be readableprint('{} {}'.format(1, 2,))I don't think format() is more readable than f"", I just think it's a preference. F it's probably more easier to use if you have difficulty remembering the position of the variable that you want to replace in the string.If though you're writing a program from backward compatibility then format() should be used.

URL: https://forum.audiogames.net/post/410565/#p410565




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: what happen with this python code?

2019-02-08 Thread AudioGames . net Forum — Developers room : Liam via Audiogames-reflector


  


Re: what happen with this python code?

I would argue that print(f) with everything in one stream is more readable as you are then not having to look at the right hand part of the stream to remember like 0 1 2 and 3 and 4 and 17 and 25 are. When you start doing a number of substitutions the .format method can be frustrating. That being said though, Python's formatting methods really extend it's power when handling text. It's one of my favorite things about the language.

URL: https://forum.audiogames.net/post/410537/#p410537




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: what happen with this python code?

2019-02-08 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: what happen with this python code?

@3, you can use print("{0} {1} {2}.format(a, b, c)) instead which is more readable

URL: https://forum.audiogames.net/post/410498/#p410498




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: what happen with this python code?

2019-02-08 Thread AudioGames . net Forum — Developers room : Liam via Audiogames-reflector


  


Re: what happen with this python code?

yep. I was gonna say. All you are currently doing is setting and changing variables. print is required to actually get the output. Also keep in mind that print I believe will throw an error if you try to directly print the integers. I tend to use f before the stream, like so print(f "{x}, {y}, {z}")no more concatenating! Woo!

URL: https://forum.audiogames.net/post/410315/#p410315




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: what happen with this python code?

2019-02-08 Thread AudioGames . net Forum — Developers room : Amit via Audiogames-reflector


  


Re: what happen with this python code?

Hi,We are directly copying the functions BGT provides, so you just need to read the help file. It will be in python soon, but file_directory and variable management are completed as of this writing.Regards,Amit

URL: https://forum.audiogames.net/post/410309/#p410309




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: what happen with this python code?

2019-02-07 Thread AudioGames . net Forum — Developers room : Amit via Audiogames-reflector


  


Re: what happen with this python code?

Hi,To see the output, you will need to use  print function. Like this:print(x)x is the variable. You can print any text or variable using it.Regards,Amit

URL: https://forum.audiogames.net/post/410269/#p410269




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


what happen with this python code?

2019-02-07 Thread AudioGames . net Forum — Developers room : wightfall via Audiogames-reflector


  


what happen with this python code?

when I writing this code and try to run in terminal still no result show upbelow is my code:#casting specific type#int typex = int(1)y = int(3.02)z = int("4")#string typegender = str("male, female")gpax = str(2.87)thanks for helping me figure out

URL: https://forum.audiogames.net/post/410265/#p410265




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector