Question: Figure I. Exercise 1 Sample Run Exercise 2 Write a Python program (Lab7-ex2.py) that reads from the user an integer n, displays the triangular number

 Figure I. Exercise 1 Sample Run Exercise 2 Write a Python

Figure I. Exercise 1 Sample Run Exercise 2 Write a Python program (Lab7-ex2.py) that reads from the user an integer n, displays the triangular number sequence up to the n term (i.e. 1, 3, 6, 10, .,noh term). The triangular of a number n is calculated as "n(n+1)y2" where n is a nonzero positive number. Note that your program should display a suitable error message if n is entered as a zero or a negative number. n Triangular 4 10 5 15 Figure 2, Exercise 2 Sample Run for n=6

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!