if you want to remove an article from website contact us from top.

    the variable age is to be used to represent a person’s age, in years. which of the following is the most appropriate data type for age ?

    James

    Guys, does anyone know the answer?

    get the variable age is to be used to represent a person’s age, in years. which of the following is the most appropriate data type for age ? from EN Bilgi.

    Variables and Assignments

    Find and create gamified quizzes, lessons, presentations, and flashcards for students, employees, and everyone else. Get started for free!

    QUIZ

    Variables and Assignments

    Variables and Assignments 56%

    37 12th Computers Ms Seccafico 11 months

    10 Qs

    1. Multiple-choice 1 minute Q.

    The variable age is to be used to represent a person’s age, in years. Which of the following is the most appropriate data type for age ?

    answer choices Boolean number string list 2. Multiple-choice 1 minute Q.

    The variable is Open is to be used to indicate whether or not a store is currently open. Which of the following is the most appropriate data type for isOpen ?

    answer choices Boolean number string list 3. Multiple-choice 1 minute

    Q.

    Consider the following code segment.

    What is the value of r as a result of executing the code segment?

    answer choices 10 20 30 40 4. Multiple-choice 1 minute Q.

    Consider the following code segment.

    What are the values of first and second as a result of executing the code segment?

    answer choices

    The value of first is true, and the value of second is true.

    The value of first is true, and the value of second is false.

    The value of first is false, and the value of second is true.

    The value of first is false, and the value of second is false.

    5. Multiple-choice 1 minute Q.

    Which of the following is a benefit of using a list as a data abstraction in a program?

    answer choices

    Lists often allow their size to be easily updated to hold as many data values as needed.

    Lists convert all elements to strings so that they can be inspected character-by-character.

    Lists prevent duplicate data values from appearing in the list.

    Lists are used to store all input data so that there is a running record of all user input.

    6. Multiple-choice 1 minute Q.

    A programmer has a need to round many numeric values to the nearest integer. Which of the following best explains the benefit of using a list as a data abstraction in this situation?

    answer choices

    Keeping the numeric values in a list makes it easier to round a number to the nearest integer.

    Keeping the numeric values in a list makes it easier to apply the same computation to every data element.

    Keeping the numeric values in a list makes it easier to prevent a program from unintentionally changing the value of a variable.

    Keeping the numeric values in a list makes it easier to prevent a program from attempting to access an index beyond the length of the list.

    7. Multiple-choice 1 minute Q.

    Assume that both lists and strings are indexed starting with index 1.

    The list wordList has the following contents.

    ["abc", "def", "ghi", "jkl"]

    Let myWord be the element at index 3 of wordList. Let myChar be the character at index 2 of myWord. What is the value of myChar ?

    answer choices "e" "f" "h" "i" 8. Multiple-choice 1 minute Q.

    Consider the following code segment.

    What are the contents of yourList after the code segment is executed?

    answer choices [10, 30, 50, 70] [20, 40, 60, 80]

    [10, 30, 50, 70, 20, 40, 60, 80]

    [20, 40, 60, 80, 10, 30, 50, 70]

    9. Multiple-choice 1 minute Q.

    Item 5Consider the following code segment.

    firstList ← ["guitar", "drums", "bass"]

    secondList ← ["flute", "violin"]

    thirdList ← [ ]

    thirdList ← firstList

    firstList ← secondList

    secondList ← thirdList

    What are the contents of secondList after the code segment is executed?

    answer choices [ ]

    ["guitar", "drums", "bass"]

    ["flute", "violin"]

    ["flute", "violin", "guitar", "drums", "bass"]

    10. Multiple-choice 1 minute Q.

    The list wordList contains a list of 10 string values. Which of the following is a valid index for the list?

    answer choices -1 "hello" 2.5 4

    Quizzes you may like

    11 Qs

    Algorithms

    908 plays

    2nd - 6th

    20 Qs

    Data Structures

    45 plays

    University

    14 Qs

    Introduction to Data Communication

    72 plays

    7th - 10th

    15 Qs

    Factual Report

    337 plays

    10th

    10 Qs

    Computer Languages

    736 plays

    KG - University

    10 Qs

    Programming - Syntax & Logic Errors

    409 plays

    3rd - 12th

    15 Qs

    Pseudocode

    983 plays

    9th - 11th

    10 Qs

    Role of a Computer

    1.5K plays

    2nd

    Source : quizizz.com

    Compsci Review Flashcards

    Start studying Compsci Review. Learn vocabulary, terms, and more with flashcards, games, and other study tools.

    Compsci Review

    5.0 1 Review

    16 studiers in the last hour

    The variable age is to be used to represent a person's age, in years. Which of the following is the mostappropriate data type for age ?

    Click card to see definition 👆

    number (int, double, float)

    Click again to see term 👆

    A teacher is writing a code segment that will use variables to represent a student's name and whether or nor the student is currently absent. Which of the following variables are most appropriate for the code segment?

    Click card to see definition 👆

    A string variable named studentName and a Boolean variable named isAbsent

    Click again to see term 👆

    1/49 Created by RyanD658

    Terms in this set (49)

    The variable age is to be used to represent a person's age, in years. Which of the following is the mostappropriate data type for age ?

    number (int, double, float)

    A teacher is writing a code segment that will use variables to represent a student's name and whether or nor the student is currently absent. Which of the following variables are most appropriate for the code segment?

    A string variable named studentName and a Boolean variable named isAbsent

    Consider the following code segment, which uses the variables r, s, and

    t.r ← 1 s ← 2 t ← 3 r ← s s ← t DISPLAY (r) DISPLAY (s)

    What is displayed as a result of running the code segment?

    2 3

    Central High School keeps a database of information about each student, including the numeric variablesnumberOfAbsences and gradePointAverage. The expression below is used to determine whether a student iseligible to receive an academic award.(numberOfAbsences ≤ 5) AND (gradePointAverage > 3.5)Which of the following pairs of values indicates that a student is eligible to receive an academic award?

    numberOfAbsences = 5, gradePointAverage = 3.8

    Assume that both lists and strings are indexed starting with index 1.The list wordList has the following contents.["abc", "def", "ghi", "jkl"]Let myWord be the element at index 3 of wordList. Let myChar be the character at index 2 ofmyWord. What is the value of myChar ?

    "h"

    Consider the code segment below.

    If the variables onTime and absent both have the value false, what is displayed as a result of running thecode segment?

    Better late than never.

    Consider the following code segment, where exam and presentation are integer variables andgrade is a string variable.IF((exam > 90) AND (presentation > 80)){grade "A"}IF((exam > 80) OR (presentation > 75)){grade "B"}ELSE{IF((exam > 70) OR (presentation > 60)){grade "C"}ELSE{IF(exam > 60){grade "D"}ELSE{grade "F"}}}Under which of the following conditions will the value "C" be assigned to the variable grade ?

    When the value of exam is 80 and the value of presentation is 60

    An office building has two floors. A computer program is used to control an elevator that travels betweenthe two floors. Physical sensors are used to set the following Boolean variables.

    The elevator moves when the door is closed and the elevator is called to the floor that it is not currently on.Which of the following Boolean expressions can be used in a selection statement to cause the elevator tomove?

    (onFloor1 AND callTo2) OR (onFloor2 AND callTo1)

    Consider the following code segment with integer variables x and y.

    If x has a value of 7 and y has a value of 20, what is displayed as a result of executing the codesegment?

    THREE

    The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal ofdetermining whether the simulation resulted in an equal number of heads and tails.

    Step 1: Initialize the variables heads_counter and flip_counter to 0.

    Step 2: A variable coin_flip is randomly assigned a value of either 0 or 1. If coin_flip has the value 0, thecoin flip result is heads, so heads_counter is incremented by 1.

    Step 3: Increment the value of flip_counter by 1.

    Step 4: Repeat steps 2 and 3 until flip_counter equals 4.

    Following execution of the algorithm, which of the following expressions indicates that the simulationresulted in an equal number of heads and tails?

    heads_counter = 2

    Sign up and see the remaining cards. It’s free!

    Boost your grades with unlimited access to millions of flashcards, games and more.

    Continue with Google

    Continue with Facebook

    Already have an account?

    Recommended textbook explanations

    C++ For Everyone 2nd Edition Horstman 513 explanations C++ for Everyone 2nd Edition Cay S. Horstmann 513 explanations

    Java Methods: Object-Oriented Programming and Data Structures

    3rd Edition

    Gary Litvin, Maria Litvin

    285 explanations

    Introduction to Java Programming, Comprehensive Version

    9th Edition Y. Daniel Liang 1,105 explanations

    Sets with similar terms

    APCSP final exam review 18

    89 terms lilbyrne86

    AP Computer Science Exam Study Guide

    35 terms AmnaKhwaja

    Computer Concepts Final Exam Review

    577 terms doubleN

    APCSP Semester Exam

    74 terms danielaleschhorn

    Sets found in the same folder

    Test answers cs

    20 terms EMAAN_SHARIFF

    Source : quizlet.com

    Compsci Review

    Flashcards related to Compsci Review within Social Media Sites category.

    Compsci Review

    Home Previous Next

    The variable age is to be used to represent a person's age, in years. Which of the following is the mostappropriate data type for age ?

    number (int, double, float)

    A teacher is writing a code segment that will use variables to represent a student's name and whether or nor the student is currently absent. Which of the following variables are most appropriate for the code segment?

    A string variable named studentName and a Boolean variable named isAbsent

    Consider the following code segment, which uses the variables r, s, and

    t.r ? 1 s ? 2 t ? 3 r ? s s ? t DISPLAY (r) DISPLAY (s)

    What is displayed as a result of running the code segment?

    2 3

    Central High School keeps a database of information about each student, including the numeric variablesnumberOfAbsences and gradePointAverage. The expression below is used to determine whether a student iseligible to receive an academic award.(numberOfAbs

    numberOfAbsences = 5, gradePointAverage = 3.8

    Assume that both lists and strings are indexed starting with index 1.The list wordList has the following contents.["abc", "def", "ghi", "jkl"]Let myWord be the element at index 3 of wordList. Let myChar be the character at index 2 ofmyWord. What is the va

    h

    Consider the code segment below.

    If the variables onTime and absent both have the value false, what is displayed as a result of running thecode segment?

    Better late than never.

    Consider the following code segment, where exam and presentation are integer variables andgrade is a string variable.IF((exam > 90) AND (presentation > 80)){grade "A"}IF((exam > 80) OR (presentation > 75)){grade "B"}ELSE{IF((exam > 70) OR (presentation >

    When the value of exam is 80 and the value of presentation is 60

    An office building has two floors. A computer program is used to control an elevator that travels betweenthe two floors. Physical sensors are used to set the following Boolean variables.

    The elevator moves when the door is closed and the elevator is calle

    (onFloor1 AND callTo2) OR (onFloor2 AND callTo1)

    Consider the following code segment with integer variables x and y.

    If x has a value of 7 and y has a value of 20, what is displayed as a result of executing the codesegment?

    THREE

    The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal ofdetermining whether the simulation resulted in an equal number of heads and tails.

    Step 1: Initialize the variables heads_counter and flip_counter to 0.

    St heads_counter = 2

    Which of the following best describes the behavior of the two programs?

    Program I displays the correct sum, but program II does not.

    Which of the following best describes the result of running the program code?

    Nothing is displayed; the program results in an infinite loop.

    Consider the following program, which is intended to display the number of times a number target appearsin a list.

    Which of the following best describes the behavior of the program?

    Both program I and program II display the correct sum.

    The following code segment is used to determine whether a customer is eligible for a discount on a movieticket.

    If category is "new" and age is 20, what are the values of val1 and val2 as a result ofexecuting the code segment?

    The program correctly displays the number of times target appears in the list.

    ASCII is a character-encoding scheme that uses 7 bits to represent each character. The decimal (base 10)values 65 through 90 represent the capital letters A through Z, as shown in the table below.

    What ASCII character is represented by the binary (base 2)

    J

    An online store uses 6-bit binary sequences to identify each unique item for sale. The store plans to increasethe number of items it sells and is considering using 7-bit binary sequences. Which of the following bestdescribes the result of using 7-bit sequ

    2 times as many items can be uniquely identified.

    Which of the following can be represented by a sequence of bits?1. An integer2. An alphanumeric character3. A machine language instruction

    I, II and III

    Each student that enrolls at a school is assigned a unique ID number, which is stored as a binary number.The ID numbers increase sequentially by 1 with each newly enrolled student. If the ID number assigned tothe last student who enrolled was the binary n

    10010100

    A student is recording a song on her computer. When the recording is finished, she saves a copy on hercomputer. The student notices that the saved copy is of lower sound quality than the original recording.Which of the following could be a possible explan

    The song was saved using fewer bits per second than the original song.

    A video-streaming Web site uses 32-bit integers to count the number of times each video has been played.In anticipation of some videos being played more times than can be represented with 32 bits, the Web site isplanning to change to 64-bit integers for t

    2^32 times as many values can be represented.

    A digital photo file contains data representing the level of red, green, and blue for each pixel in the photo.The file also contains metadata that describes the date and geographic location where the photo was taken.For which of the following goals would

    Source : www.assignguru.com

    Do you want to see answer or more ?
    James 7 month ago
    4

    Guys, does anyone know the answer?

    Click For Answer