2018-19 Lesson 3: Strings, Integers and Float

Post date: Nov 9, 2018 3:58:56 PM

print("Hello World!!!")

first_name = input("What is your name?")

print("Hello", first_name, "How are you?")

first_name = "Test"

print("Hello", first_name, "How are you?")

print("I can do math!")

a = int(input("Give me a number:"))

b = int(input("Give me a second number:"))

print("The sum is", a + b)

print("The difference is", a - b)

print("The product is", a * b)

print("The quotient is", a / b)

print("a on the power of b", a ** b)

a = a / b

print(a)

import math

c = float(input("Give me c:"))

d = float(input("Give me d:"))

print("The sum is", c + d)

print("The difference is", c - d)

print("The product is", c * d)

print("The quotient is", c / d)

print("a on the power of b", c ** d)

print("Square root of c", math.sqrt(c))

print("Square root of d", math.sqrt(d))