Tutorial 2' - while - conditions - other exercises


Exercise 4

Write a program that displays a sequence of 12 numbers, each term equal to three times the previous term.

Exercise 12


Write a program that converts a user-provided speed given in miles per hour (1 mile = 1609 meters) into meters per second and then into km/h.


Exercise 13

Convert any grade N, entered by the user as points (for example 27 out of 85), into a standardized grade according to the following code :
        Grade         Appreciation
    N >= 80 %                    A
    80 % > N >= 60 %        B
    60 % > N >= 50 %        C
    50 % > N >= 40 %        D
    N < 40 %                       E