python age code example
Example 1: python
'''Python is an interpreted, high-level and general-purpose programming
language.Python's design philosophy emphasizes code readability with its
notable use of significant whitespace. '''
print("Hello World")
repeat = 5
for i in range(repeat):
print("This is the %i iteration" % i)
import random
class Person:
def __init__(self, name, age, height):
self.name = str(name)
self.age = int(age)
self.height = str(height)
person1 = Person("Name", random.randint(1, 100), str(random.randint(0, 7)) + "'" + str(random.randint(0, 11)) + '"')
print(f"Your name is {person1.name} and you are {person1.age} years old. You are also {person1.height}.")
Example 2: python
from _future_ import print_function
import matplotlib.pyplot as plt
import os
import sys
import re
import gc
mathtext_tiles = {
0: "Header demo"
1: "Subscripts and superscripts"
2: "Fraction ,bionomals and stacked numbers"
3: "radicals"
4: "Fonts"
5: "Accents"
6: "Greek Herbew"
7: "Delimeters, functions and symbols"}
n_lines = len(mathtext_titles)