Posts: 13
Threads: 2
Joined: May 2018
(May-27-2018, 04:39 PM)Larz60+ Wrote: you are running python interpreter correct? from command line, type python followed by enter you should see: Output: Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD6 4)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
or something very similar at >>> prompt type the code one line at a time paste your output I am using something similar to python, only it's on a website.
Posts: 11,870
Threads: 474
Joined: Sep 2016
Please do not send private mail. Answer here for all to see
Posts: 13
Threads: 2
Joined: May 2018
(May-27-2018, 04:39 PM)Larz60+ Wrote: you are running python interpreter correct? from command line, type python followed by enter you should see: Output: Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD6 4)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
or something very similar at >>> prompt type the code one line at a time paste your output I am using a different version of python. Did you get my private message?
Posts: 11,870
Threads: 474
Joined: Sep 2016
Read my response above. I usually ignore private mail
Posts: 13
Threads: 2
Joined: May 2018
I got:
Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 01:31:54) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> en_tobacco = 'tobacco'
>>> sp1_tobacco = 'tabaco'
>>> sp2_tobacco = 'cigarrillo'
>>> en_tobacco = 'tobacco' sp1_tobacco = 'tabaco' sp2_tobacco = 'cigarrillo' print('{} is {} in Spanish but could also be {}'.format(en_tobacco, sp1_tobacco, sp2_tobacco))
SyntaxError: invalid syntax
Posts: 212
Threads: 25
Joined: Aug 2019
(Nov-21-2019, 11:41 PM)baobei Wrote: I got:
Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 01:31:54) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> en_tobacco = 'tobacco'
>>> sp1_tobacco = 'tabaco'
>>> sp2_tobacco = 'cigarrillo'
>>> en_tobacco = 'tobacco' sp1_tobacco = 'tabaco' sp2_tobacco = 'cigarrillo' print('{} is {} in Spanish but could also be {}'.format(en_tobacco, sp1_tobacco, sp2_tobacco))
SyntaxError: invalid syntax
Hi!
You are not following correctly the instructions from Larz60+.
Output: Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> en_tobacco = 'tobacco'
>>> sp1_tobacco = 'tabaco'
>>> sp2_tobacco = 'cigarrillo'
>>> print('{} is {} in Spanish but could also be {}'.format(en_tobacco, sp1_tobacco, sp2_tobacco))
tobacco is tabaco in Spanish but could also be cigarrillo
>>>
All the best,
newbieAuggie2019
"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Posts: 13
Threads: 2
Joined: May 2018
But still, what is the answer?
Posts: 13
Threads: 2
Joined: May 2018
Mar-21-2020, 04:22 PM
(This post was last modified: Mar-21-2020, 04:23 PM by buran.)
Here's my output:
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> en_tobacco = 'tobacco'
>>> sp1_tobacco = 'tabaco'
>>> sp2_tobacco = 'cigarrillo'
>>>
>>> print('{} is {} in Spanish but could also be {}'.format(en_tobacco, sp1_tobacco, sp2_tobacco))
tobacco is tabaco in Spanish but could also be cigarrillo
>>>
|