Printing your name in large letters

Q: Write a program that prints your name in large letters.

Product of the First Ten Positive Integers

Q: Write a program that prints the product of the first ten positive integers, 1 × 2 × … × 10. (Use * to indicate multiplication in Python.)


Balance of an Account

Q: Write a program that prints the
balance of an account after the first, second, and third year. The account has an initial balance of $1,000 and earns 5 percent interest per year.
balance = 1000
percent = 0.05
for i in range(1,4):
    balance = balance+ balance*percent
    print("The balacne after %d is %.2f"%(i,balance))

Sum of the first ten positive integers

Q: Write a program that prints the sum of the first ten positive integers.





By Using for loop:
for i in range(0,10):
    print(i+1)


By Using while loop:


n = 1
while(n<=10):
    print(n)
    n+=1


By Using Recursive:


def Sum(CScientists):
    if CScientists == 10:
        return 10
    print(CScientists+1)
    return Sum(CScientists+1)

Start = 0
Sum(Start)

Printing a greeting of your choice


Q: Write a program that prints a greeting of your choice, perhaps in a language other than English.

Input:

  • Your choice number from the menu.
Output: 
  • prints a greeting

The Code:

#CScientists.
print("Please choose one of these: ")
print("1 - Hey\n2 - Hello\n3 - How are you doing?\n4 - Good morning\n5 - Good evening")
Choice = int(input("Please enter your choice: "))
if Choice == 1:
    print("Hey")

if Choice == 2:
    print("Hello")
 
if Choice == 3:
    print("How are you doing?")
 
if Choice == 4:
    print("Good morning")
 
if Choice == 5:
    print("Good evening")

#CScientists.