Source Code

Example 1

# Example 1 
a = 1
b = 2
print(a + b)

Example 2

# Example 2
a = 3
b = 4
print(a - b)

Example 3

# Example 3
a = 5
b = 6
print(a * b)

Example 4

# Example 4
a = 121
b = 11
print(a / b)

Example 5

# Example 5
a = 77
b = 10
print(a // b)

Example 6

# Example 6
a = 9
b = 2
print(a % b)

Example 7

# Example 7
a = 8
b = 2
print(a % b)

Example 8

# Example 8
a = 2
b = 3
print(a ** b)

Example 9

# Example 9
myName = input("What is your name? ")
print("Name: " + myName)

Example 10

# Example 10
age = int(input("How old are you? "))
print("Age: " + str(age))

Example 11

# Example 11
money = float(input("How much money do you have? "))
print("Money: $" + str(money))

Last updated