Question: have no idea why it shows invalid syntax. There shouldnt be an error since my instructor posted this... # Whatz it do? print(This program will

 have no idea why it shows invalid syntax. There shouldnt be

have no idea why it shows invalid syntax. There shouldnt be an error since my instructor posted this...

# Whatz it do? print("This program will compute the sum of the sequence from 1 to n.") # PRIMING READ # Get the num num_str -input ("InPlease enter a whole positive number " "(or press KENTER> to quit): ") # CONTINUATION TEST # Have a (nother) round? while num str: # VALIDATION LOOP (aka ERROR TRAP - you're stuck here now!) # Did you give me what I want? while not (is_positive whole (num_str)): print ("%s is NOT a positive whole number! " % numstr) print ("Are you trying to scramble my electronic brain? " - "PLEASE give me valid input!!!n") # Try again, please! num_str -input ("Please enter a whole positive number " "(or press KENTER> to quit): ") # CONVERT -make me a number num - int (num str) # INITIALIZE ACCUMULATOR- so I can remember what I've summed so far sequence. Sum = 0 # OUTPUT - tell me what I've got print (" The sum from 1 to %d is %d " % (num, sumto (num)) - # CONTINUATION READ -more stuff OR QUIT? num-st input (" Please enter a whole positive number " " (or press to quit): ") #RUN ME! main ()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!