ASCI Logo
ASCI.Academy
LearnPracticeCompeteCareer
Sign InGet Started

Search ASCI Academy

Universal search across Courses, Lessons, Skills, Projects, Challenges, Competitions, Jobs, Internships, and Users

python ai

Curriculum Index

Current LevelInitiate
0/ 500 XP
Gravit Certificate:
100% Required
  • 1.1 Modern Python Type Hints & Annotations
  • 1.2 List Comprehensions & Generator Expressions
•
1
2
3
4
5
6
7
8
9
10
Module 1: Language Syntax, Memory Model & Type Hints•Lesson 1

1.1 Modern Python Type Hints & Annotations

### Static Type Annotations in Python
While Python is dynamically typed at runtime, modern systems enforce static type checking during CI/CD to prevent bugs before deployment.

example.pyPython 3.11
def calculate_tax(subtotal: float, rate: float = 0.08) -> float:
return round(subtotal * rate, 2)

print(calculate_tax(100.0))
Python 3.11
•
Interactive Challenge
+50 XP
Challenge Objective

Return and print the formatted string 'HELLO_ARCHITECT'.

solution.py
UTF-84 SpacesAuto-saved
cpython3.11:~/workspace
CPython 3.11.8 (WASM)
$python3 -u solution.py
Click "Compile & Run" (or press Ctrl + Enter) to compile AST, verify bytecode, and execute the solution.