CJCoding With Joseph
15free / daySign inCreate account
← Back to Question List
Python Code Walkthrough #4

Formatting A Grade Point Average

easyPrinting

📄 Code

Read carefully — what does this print?
1gpa: float = 3.14159
2credits: int = 12
3print(gpa)
4print(f'{gpa:0.2f}')
5print(f'{credits} credits at {gpa:0.1f}')
6print(credits / 4)

🎯 Your Answer