Hi, what I am trying to do is:
- let the prog to do calculation based on subjects’ choices in the previous loop and stored in the generated excel named “budget”,
- in the instruction for next loop(block), I want to write “in the following block, you have $budget in total” in the text. The $budget will differ among subjects.
however I found the $ does not function in the text stim…
in my case, are there other possible solutions?
ha, I tried:
text='take a break!\nin the following block, you have %d s to spent.\npress"space" to continue' %(budget1),
and it worked…
but still curious about how to use $ in the text?
Q2: how to selectively set some words as bold or change the color into red in one text?
'In this following block, you have' + '\033[1m' + '20s' + '\033[0;0m' +'in total to spend.\nTo start, please press "space"\n\nplease remember:\nleft : press "A"\nright: press "L"'
but does not work…
I found a post provided a solution, but not sure understand it correctly
Thanks a lot!