Question: 4 . 4 . 1 : While loop: Print 1 to N . Write a while loop that prints from 1 to user _ num,

4.4.1: While loop: Print 1 to N.
Write a while loop that prints from 1 to user_num, increasing by 1 each time.
Write a program that lets a user enter N and that outputs N!(N factorial, meaning N*(N-1)*(N-2)*...*2*1). Hint:Use a loop variable i that counts from total-1 down to 1. Compare your output with some of these answers: 1:1,2:2,3:6,4:24,5:120,8:40320.
Write a program that prints the U.S. presidential election years from 1792 to present day, knowing that such elections occur every 4 years.
Given positive integer num_insects, write a while loop that prints, then doubles, num_insects each iteration. Print values 100. Follow each number with a space.
4.3.3: While loop: Insect growth.
Given positive integer num_insects, write a while loop that prints, then doubles, num_insects each iteration. Print values 100. Follow each number with a space.
Write an expression that continues to bid until the user enters 'n'.
Sample output with inputs: 'y''y''n'
Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the loop.
Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the loop.
Write an expression that executes the loop body as long as the user enters a non-negative number.

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 Programming Questions!