Challenge 1
Annotate count as an int and assign 5.
count
print(count)
Press Ctrl⌘Enter to check your answer
Practice annotated assignment syntax and the compatibility behavior of explicitly stringized annotations.
Challenge 1
count
print(count)
Press Ctrl⌘Enter to check your answer
Challenge 2
total
total = 12
print(total)
Press Ctrl⌘Enter to check your answer
Challenge 3
class Person:
name
print(Person.name)
Press Ctrl⌘Enter to check your answer
Challenge 4
def calculate():
total = 10
return total
print(calculate())
Press Ctrl⌘Enter to check your answer
Challenge 5
from __future__ import annotations
def describe(value:
return value
print(describe.__annotations__)
Press Ctrl⌘Enter to check your answer