Quiz
Python Type Conversion and input() Quiz
Free beginner quiz on Python type conversion and input(): 15 questions on int(), float(), str(), bool() and reading numbers from the user.
Showing 1–10 of 17
Quiz
Free beginner quiz on Python type conversion and input(): 15 questions on int(), float(), str(), bool() and reading numbers from the user.
Example
Changing data types using int(), float() and str() functions. Converting between types.
Quiz
…Python variables: 15 questions on naming, assignment, data types, type conversion and scope, with instant answers.
Article Python Fundamentals
Learn Python variables and data types - the building blocks of programming. Discover how to store numbers, text, and complex data structures effectively while following best practices for clean and…
Challenge
…and text that only looks like numbers. Predict what type() shows, find the values that need converting, then convert a packet yourself.
Challenge
…out the crew after the next docking. Whatever number you type, it crashes. Predict what happens, find out why input() is behind it, fix it, then write a packing tool that reads two numbers. Predict…
Challenge
A status line crashes with a TypeError because it joins text and a number with +. Predict it, read the error, fix it with str(), then build a docking status line.
Challenge
…are written. Investigate and modify Investigate. Store the type of the readings in reading_type : int , float , str or bool . Modify. The readings arrive as text, so leave the two lines that set them…
Challenge
…can last part of a second, like 12.4. When you press Run, type the number in the console. When you check, the tests type it for you. What the burn leaves The flight director also wants to know what…
Quiz
…quiz: 15 Python errors to read and fix – NameError, TypeError, ValueError, IndexError, KeyError, IndentationError and ZeroDivisionError.