Jump to content

I need to pair 2 python files

Hey! I can't seem to figure out how to link these two scripts together. 

 

My first file (Start_value) is

start = 1
print ('start')
	

And my second file (End_value) is 

import Start_value
end = 2
print(start - end)
	

What am I messing up?

Link to comment
Share on other sites

Link to post
Share on other sites

You imported it as start_value so you will need to access it like this

 

start_value.start

 

Or other option is to

 

from start_value import start

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

20 hours ago, vorticalbox said:

You imported it as start_value so you will need to access it like this

 

start_value.start

 

Or other option is to

 

from start_value import start

I get an error: ModuleNotFoundError: No module named 'Start_value'

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, Ryan West said:

I get an error: ModuleNotFoundError: No module named 'Start_value'

make sure both files are in the same folder 

There are 10 types of people in the world: those who understand binary numbers and those who don’t

bulgara, oh nono

Multipass

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×