Cannot return results of part of a script

When I run only a few lines of the script, it does not return any results but a message like “finished in xx s”. Not sure why. Has anyone seen this?

Unless you show us the script, we can’t tell you what it’s supposed to output.

Here is my whole script:

-----------starting line------------------------------

a=‘hippo’*12 # a is a string with 12 hippo

total_sales=3400
print("this week’s total sales: ", total_sales) #连接string和int

function

name=‘apple’
print(name.islower())

print(‘one fish,2 fish,red fish, blue fish’.count(‘fish’)) #count how many ‘fish’ string appeared in the object “one fish,2 fish,red fish, blue fish”
#类似的methods:
name=‘apple’
print(name.find(‘a’))
---------------------------end of script--------------------------

My question:
If I only want to run 2 lines of the above script, for example:
name=‘apple’
print(name.islower())
it does not output anything in Atom…Only shows 'finished in 0.30s".

Notice how your post doesn’t look anything like your script. If you paste code into this forum, you need to mark it as code using the </> button above the editor, or take a screenshot, or share it via one of the many websites (including but not limited to GitHub, Pastebin, and Dropbox) that allow you to easily post links to plain-text files. Please re-share in a way where a person on the Internet can try the exact same code.

By the way, it’s obvious to me that you’re using script based on the output line, but that’s information that you should have shared at the beginning since not everyone is going to immediately recognize every package based on the messages they give.

Hi,
This is my script below. I installed the script package in Atom to run this codes, but it does not return any result if I try to run just a few lines of it…(sorry for the format before I am new to this website…)

`a=‘hippo’*12 # a is a string with 12 hippo

total_sales=3400
print("this week’s total sales: ", total_sales) #连接string和int

function
name=‘apple’
print(name.islower())

print(‘one fish,2 fish,red fish, blue fish’.count(‘fish’)) #count how many ‘fish’ string appeared in the object “one fish,2 fish,red fish, blue fish”
#类似的methods:
name=‘apple’
print(name.find(‘a’))`

in:a=‘hippo’*12
in: total_sales=3400
in:print(“this week’s total sales: %d”% total_sales)
out:this week’s total sales: 3400
in: name=‘apple’
in:print(name.islower())
out:True
in:print(‘one fish, 2 fish,red fish,blue fish’.count(‘fish’))
out:4
in:name=‘apple’
in:print(name.find(‘a’))
out:0

Do the same two lines work if those are the only lines in the file and you run the whole thing?

Yes, it works. That is the werid part…

Then it seems like script is unable to run just a couple of lines, even though it’s acting like it can.