# Problems

# count up

Using a while loop, print numbers from 1 to 10.

Ask the user what town they live in. Using a while loop, print the name of their town 4 times.

Using a while loop, print the powers of 2 from

$2^0$

to$2^9$

Using a while loop, print even numbers from 0 to 100.

Using a while loop, print the sum of the first 100 numbers. (1 + 2 + 3 + ... + 100)

You work for five days. Using a while loop, ask the user how much money they make each day. Print how much money they have after five days.

First, ask the user for their name. Second, ask the user how many times they want to print their name. Using a while loop, print the user's name the number of times they specified.

Ask the user for a number. Using a while loop, print the squares from 1 to this number.

For example, if the user enters 10, you'll program will print:

Ask the user for two numbers, a and b. Print the sum of all the numbers between a and b (inclusive).

Ask the user for two numbers, a and b. Using a while loop, print the odd numbers between a and b (inclusive). How do you figure out if a number is even or odd?

Ask the user for two numbers, a and b. Using a while loop, print the sum of the odd numbers between a and b (inclusive).

You put $10,000 into a bank account that earns 5% interest per year. The interest formula is:

$A=P(1+r)^t$

$A=amount$

$P=Principal$

$r=rate$

(in %)

$t=time$

(in years) a) Print the balance per year until the time in years.

b) How many years will it take for the account balance to double the original investment? Estimate this by inputting different amounts of time.

c) How many years does it take to triple?

c) The Swiss National Bank (SNB) is charging a 0.75 percent fee on large deposits at the central bank, a cornerstone of its monetary policy since January 2015 which is aimed at weakening Switzerland’s currency.

If Swiss banks paid 970 million Swiss francs ($1 billion) in negative interest rate charges in the first six months of 2017, how much in deposits do Swiss banks have?

How many years will it take for the balance to be 0.

Last modified 4yr ago