i have made this code
first_name = "ada"
last_name = "lovelace"
full_name = f"{first_name} {last_name}"
print(f"Hello, {full_name.title()}!")
this is the mistake it makes
ada lovelace
Process finished with exit code 0
Hi
i Ran your code and got the output
Output:
Hello, Ada Lovelace!
what is the output you are expecting ?
That was the result i was looking for. sp why does it say
ada lovelace
Process finished with exit code 0
in my pycharm
(Aug-25-2019, 06:11 PM)Yoriz Wrote: [ -> ]Hi i Ran your code and got the output Output:
Hello, Ada Lovelace!
what is the output you are expecting ?
BTW sorry for the double posting. It just thought it didnt post. so i pressed twice but it did. hope you want kick me out.
i looked on google and found this
https://intellij-support.jetbrains.com/h...g-python-3
pycharm has problems with f format apprently. how did you run it. i tried idle and got a wierd error
)
SyntaxError: multiple statements found while compiling a single statement
maybe i will try sublime text free version
I used VS Code.
The error
Error:
SyntaxError: multiple statements found while compiling a single statement
is because you tried to paste all the code into the python idle shell and it didn't like it.
pasting it into the command line worked ok
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> first_name = "ada"
>>> last_name = "lovelace"
>>> full_name = f"{first_name} {last_name}"
>>> print(f"Hello, {full_name.title()}!")
Hello, Ada Lovelace!
>>>
Are you using Windows?
The basic here Python
3.6/3.7 and pip installation under Windows.
If using PyCharm you most configure it to use Python 3,
Configure a Python interpreter.
james_newbie Wrote:maybe i will try sublime text free version
A better option is
VS Code from start
It's must that
python
and
pip
is configure right(on all OS Windows,Linux or Mac) from command line.
E:\div_code
λ python -V
Python 3.7.3
# look at code
E:\div_code
λ cat lovelace.py
first_name = "ada"
last_name = "lovelace"
full_name = f"{first_name} {last_name}"
print(f"Hello, {full_name.title()}!")
# Run code
E:\div_code
λ python lovelace.py
Hello, Ada Lovelace!
I am using
cmder here as cmd/powershell is a nightmare
(Aug-25-2019, 07:18 PM)snippsat Wrote: [ -> ]Are you using Windows? The basic here Python 3.6/3.7 and pip installation under Windows. If using PyCharm you most configure it to use Python 3, Configure a Python interpreter. james_newbie Wrote:maybe i will try sublime text free version
A better option is VS Code from start It's must that python
and pip
is configure right(on all OS Windows,Linux or Mac) from command line. E:\div_code λ python -V Python 3.7.3 # look at code E:\div_code λ cat lovelace.py first_name = "ada" last_name = "lovelace" full_name = f"{first_name} {last_name}" print(f"Hello, {full_name.title()}!") # Run code E:\div_code λ python lovelace.py Hello, Ada Lovelace!
I am using cmder here as cmd/powershell is a nightmare
im using mac i try to setup sublime text. what is the other i dont know what pip is. i am complete newbie.
it says 3.7 in interpretur but can+t take f format. but f format should be ok in above 3.6 and i should hae 3.7
the book i use uses sublime text.
(Aug-25-2019, 07:37 PM)james_newbie Wrote: [ -> ] (Aug-25-2019, 07:18 PM)snippsat Wrote: [ -> ]Are you using Windows? The basic here Python 3.6/3.7 and pip installation under Windows. If using PyCharm you most configure it to use Python 3, Configure a Python interpreter. james_newbie Wrote:maybe i will try sublime text free version
A better option is VS Code from start It's must that python
and pip
is configure right(on all OS Windows,Linux or Mac) from command line. E:\div_code λ python -V Python 3.7.3 # look at code E:\div_code λ cat lovelace.py first_name = "ada" last_name = "lovelace" full_name = f"{first_name} {last_name}" print(f"Hello, {full_name.title()}!") # Run code E:\div_code λ python lovelace.py Hello, Ada Lovelace!
I am using cmder here as cmd/powershell is a nightmare
im using mac i try to setup sublime text. what is the other i dont know what pip is. i am complete newbie. it says 3.7 in interpretur but can+t take f format. but f format should be ok in above 3.6 and i should hae 3.7 the book i use uses sublime text.
i made it work. set up python 3.7 in terminal and then get the right build in sublime text.
i dont know how to make box brackets on a mac. can i use curly or normal for code.
i have to relearn my html for the quistions.
(Aug-25-2019, 07:37 PM)james_newbie Wrote: [ -> ]im using mac i try to setup sublime text.
Installing Python 3 on Mac OS X or a better altentive in my view
pyenv Simple Python Version Management |
build environment Mac.
Quote:what is the other i dont know what pip is
pip
is one of the most important part of Python,it's dos package management.
So we have
PyPi using a package eg
Requests pip install requests
.
This download and install automatic for you.
Quote:the book i use uses sublime text.
This dos not all mean that you need to use sublime text,VS Code is more geared against at Python and a better free option in my view.