A quick task for you
Q1. What kind of data does the input()
function return?
- Elements
- Decimals
- Strings
- Integers
Q2. What does the int()
function do?
- Changes data to whole numbers
- Changes data to a string
- Does nothing
- Changes a function into a different function
Q3. How is the float()
function different from the int()
function?
- They are not different, they do the same thing
- The
float()
function deals with strings only - The
float()
function converts data into floating point numbers only float()
converts words into numbers
Q4. If you make a function called addition()
in your Python shell, how do you run that addition function to test it?
- Type addition in your Python shell
- Type def addition in your Python shell
- Type
addition()
in your Python shell - Type
addition()
in ...
Get Python Projects for Kids now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.