Guide Python Beginner

Type Conversion: Chapter Practice

Apply type conversion with a mini lab and knowledge check.

1 min read

Mini lab

Parse a CPU reading from “72.5” and compare it with 70.

Expected output: True

HintUse the chapter examples to choose the operation, then run your version before opening the solution.
Show solution
cpu = float("72.5")
print(cpu >= 70)

Knowledge check

Is bool(“False”) false?

Check your answerNo. Every nonempty string is truthy.

Finish the chapter

  • Explain each operation without reading the lesson.
  • Change the sample input and predict the output before running it.
  • Revisit the chapter if the result differs from your prediction.

Back to this chapter · Choose the next chapter

Add More Questions to This Guide

Know a question that should be here? Share it and help the community!

Open Google Form