[Multiple Choice]Valid data type

  • Thread starter jackylaucf
  • Start date
  • Tags
    Data Type
In summary, the question is related to a specific programming language and you are supposed to answer which of the four is a valid data type in that language. For instance, for Java, answer C would be correct as the three others are not valid native data types in Java.
  • #1
jackylaucf
3
0
hey guys I am learning greenfoot programming in college. I found out one multiple choice question that make me quite confused.

Which of the following is a valid data type?
A. integer
B. floating
C. boolean
D. number

Why is the answer option C?
I think that integer, floating and boolean are all valid data type...

Would someone like to explain it please? Thank you!
 
Technology news on Phys.org
  • #2
I guess that the question is related to a specific programming language and you are supposed to answer which of the four is a valid data type in that language. For instance, for Java, answer C would be correct as the three others are not valid native data types in Java.
 
  • #3
Your question puzzled me at first because I had never heard of a programming language named "Greenfoot." A bit of searching revealed that Greenfoot is actually a programming environment (set of tools and user interface) for the Java language. Don't confuse the language with the tools that you use to write programs in it. There are many ways (sets of tools) that you can write Java programs.

Anyway, Java does have a floating data type, but it's called "float", not "floating". Actually it has two of them: "float" and "double". They can store data with different precision (number of digits). Similarly, Java doesn't have a type called "integer". There are four integer types, which I'll let you look up for yourself.
 
  • #4
jtbell said:
A bit of searching revealed that Greenfoot is actually a programming environment

Aha! When I read that post I thought "greenfoot" was some kind of slang for beginner .. which I guess it is in some way. At least, Greenfoot do look like a nice environment for beginners to learn programming. Making actors move and interact on screen seems so much more interesting and relevant than the usual type of assignments beginners get when learning Java.
 
  • #5
Filip Larsen said:
I thought "greenfoot" was some kind of slang for beginner

It does remind me of "greenhorn", now that you've jogged my memory. :D
 

1. What is a valid data type in scientific research?

In scientific research, a valid data type refers to the type of data that is collected and used for analysis. This can include numerical data, categorical data, and textual data.

2. How do you determine which data type is valid for a particular study?

The type of data that is considered valid for a study depends on the research question and the variables being measured. For example, if the research question is about measuring the effectiveness of a new medication, numerical data such as blood pressure readings would be a valid data type to collect.

3. Can a data type be considered valid for one study but not for another?

Yes, the validity of a data type is context-specific and can vary depending on the research question and variables being measured. What may be a valid data type in one study may not be relevant or appropriate for another study.

4. Why is it important to use valid data types in scientific research?

Using valid data types is crucial in scientific research as it ensures that the data collected is relevant and appropriate for the research question. This helps to ensure the accuracy and reliability of the results obtained from the study.

5. How can you ensure the validity of your data types in a study?

To ensure the validity of data types in a study, it is important to carefully select and define the variables being measured. This can be done through pilot testing, peer review, and using established measurement tools or techniques.

Similar threads

  • Programming and Computer Science
Replies
10
Views
1K
  • Programming and Computer Science
Replies
8
Views
256
  • Programming and Computer Science
Replies
32
Views
1K
  • Programming and Computer Science
Replies
8
Views
972
  • Programming and Computer Science
Replies
30
Views
4K
  • Programming and Computer Science
Replies
6
Views
2K
  • Programming and Computer Science
Replies
25
Views
1K
Replies
1
Views
741
  • Programming and Computer Science
Replies
4
Views
15K
  • STEM Academic Advising
Replies
3
Views
860
Back
Top