I have two scripts on my Prime. When the first one is finished, it imports the second one and runs it. How do I stop it? Doesn't do this on my Casio TI Nspire, 48+ CE or Numworks.
impressive collection of calculators. It would be helpful to have more information about the problem (like screenshots), since the information is pretty vague.
I'll do that when I get back to work Monday.
Cone program. Calculates the sheet metal size for a rolled cone.
from math import *
import math

major = input("major dia=")
major = float(major)
#print(major)
minor = input("minor dia=")
minor = float(minor)
#print(minor)
height = input("height=")
height = float(height)
#print(height)
o = math.sqrt((height*major/(major-minor))**2+(major/2)**2)
i = math.sqrt((height*minor/(major-minor))**2+(minor/2)**2)
angle = 360*major/(2*o)
r_angle = angle*(pi/180)
if angle >180:
x = o+o*sin(((angle-180)*(pi/180))/2)
y = 2*o
else:
x = o-i*cos((angle/2*(pi/180)))
y = 2*o*sin((angle/2*(pi/180)))
print("radius 1 = {0:6.3f}".format(o))
print("radius 2 = {0:6.3f}".format(i))
print("angle = {0:6.2f}".format(angle))
print("b height = {0:6.3f}".format(x))
print("b width = {0:6.3f}".format(y))
if y>144:
print("blank oversized")

red.py is a list of the magic eight ball responses that comes up randomly when pressing enter.
from micropython import *
from urandom import *
from urandom import random
import random

eightlist = ["It is certain ",
"Reply hazy, try again",
"Don’t count on it",
"It is decidedly so",
"Ask again later",
"My reply is no",
"Without a doubt",
"Better not tell you now",
"My sources say no",
"Yes definitely",
"Cannot predict now",
"Outlook not so good",
"You may rely on it",
"Concentrate and ask again",
"Very doubtful",
"As I see it, yes",
"Most likely",
"Outlook good",
"Yes",
"Signs point to yes" ]

shake = ""

while True:
shake = input("Shake for answer ")
if shake == "":
print (random.choice(eightlist)
)
#print (eightlist[eightball])
else:
print ("Thanks for playing")
break

Cone runs then at the end, it displays <import> red.py and runs that program.
The Prime calculator has a feature called "Autostart" that automatically executes a specific script when the calculator is turned on or reset. If the second script is set to automatically execute through this feature, you can disable it. To do this, go to the "Programs" menu, select the second script, press the "Shift" key, and then press the "Menu" key. Look for an option related to autostart or automatic execution and disable it. This should prevent the second script from running after the first one finishes.
I could not get that to work for python scripts or regular HP programs.
Shift Plot calls up that menu. It has a blanket autorun check box that I switched off.

Thomas White wrote:
The Prime calculator has a feature called "Autostart" that automatically executes a specific script when the calculator is turned on or reset. If the second script is set to automatically execute through this feature, you can disable it. To do this, go to the "Programs" menu, select the second script, press the "Shift" key, and then press the "Menu" key. Look for an option related to autostart or automatic execution and disable it. This should prevent the second script from running after the first one finishes.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement