NEUBIAS / training-resources

Resources for teaching/preparing to teach bioimage analysis
https://neubias.github.io/training-resources
Other
48 stars 21 forks source link

String variables #337

Open tischi opened 2 years ago

tischi commented 2 years ago

@manerotoni

Will you explain in variables what a String is?

If not, we have to explain it in string concat.

My instinct would be to explain the most common types of variables (including strings) in the module about variables. What do you think?

manerotoni commented 2 years ago

I can. The variable module is still draft stage, but it make sense to explain what different variables we can have.

I feel I should also show some more advanced languages, to point that depending on the language you declare a type too. This is technical but quite important.

Numbers, strings, ..

tischi commented 2 years ago

I feel I should also show some more advanced languages, to point that depending on the language you declare a type too. This is technical but quite important.

Yes, good idea!

tischi commented 2 years ago

@manerotoni @AnniekStok I added more stuff to the String concat module:

activity_preface: |
  - Open a script editor.
  - Define three variables with values `"Analyzing image"`, `11` and `"..."`.
  - Concatenate the variables to create the string: `"Analyzing image 11..."`.
    - Tip: You'll need another space character
  - Print the string that separates folders on your operating system
    - Tip: Use an in-built function for this
  - Print the string `\`
    - Depending on the scripting language that may be a little challenge.
    - Print the string `"\"` (it should actually print the quotation marks!)
  - Create a string with two sentences and a line break.

Should we rename it? Maybe to Working with Strings?

manerotoni commented 2 years ago

Yes maybe working with strings is more appropriate than just string concat. Anything like getting file names etc is working with strings.