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 data type would you use for a person's age?
Think of a number without decimals.
What data type is used for a grade such as 89.5?
Does it have a decimal point?
What is the data type for text in programming?
Think about how we represent names.
True or False: A float can hold a whole number.
Consider what types of numbers can be stored.
Write a program that asks for a user's age (integer), height (float), and name (string). Then print a statement incorporating all three.
Make sure to use the appropriate data type for each input.
Create a program that asks for two temperature readings: one in Celsius (float) and one in Fahrenheit (float). Convert the Celsius to Fahrenheit using the formula F = C * 9/5 + 32 and print both.
Remember to retain decimals in the input type.
6 more questions in this section. Enroll free to practise them all.
Enroll free