Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What function would you use to convert a string to an integer?
Think about which function starts with 'i' and handles integers.
What would bool('') return?
Consider what Truthy or Falsy means in Python.
What does int('45') return?
Think about what happens when you convert strings of numbers.
Is float('3.14') equal to 3.14?
Consider the value and how it's represented in Python.
Create a program that takes user input as a string, converts it to int, subtracts 10, and returns the result. What will the output be if the input is '50'?
Follow through with input conversion before performing any arithmetic.
Write a function that accepts a string of numbers separated by commas, converts each to int, and returns the total sum of these integers.
Think about how to process each number individually after conversion!
5 more questions in this section. Enroll free to practise them all.
Enroll free