Quiz_ CSC 15 Spring 2021 Exam 1-1
.pdf
keyboard_arrow_up
School
California State University, Sacramento *
*We aren’t endorsed by this school
Course
15
Subject
Computer Science
Date
Apr 29, 2024
Type
Pages
9
Uploaded by ChancellorTapirMaster1047 on coursehero.com
9/28/21, 4:25 PM
Quiz: CSC 15 Spring 2021 Exam 1
https://csus.instructure.com/courses/72516/quizzes/340451/take?preview=1
1/9
CSC 15 Spring 2021 Exam 1
This is a preview of the published version of the quiz
Started: Sep 28 at 4:22pm
Quiz Instructions
There are some programming questions in this exam. you can only take this exam one time
be sure to answer all the questions
there are also multiple choice questions, true/false and fill in the blank questions
manage your time to answer all the questions
submit your exam only when one done.
using jgrasp to do the programing questions might waste your time since you might get syntax errors.
Concentrate on the solution and not the syntax.
This is a closed book, closed notes exam and you may not use any digital or human assistance
5 pts
Question 1
True
False
The work on this exam is my own and I pledge to not use any outside sources or
people to help me. By clicking True I pledge that I will not cheat. 5 pts
Question 2
Assume that integer variable m1 has the value 7, integer variable m2 has the value 10 an
d integer variable m3 has the value zero. what would be the output of the following code segment? Note that there is only one space between the numbers in each output m1 = m1 + m2 * (3/4); m2 = m1 * 3 * 5 % 2; m3 = m1 + m2; System.out.print(m1+" "); System.out.print(m2+" "); System.out.print(m3);
9/28/21, 4:25 PM
Quiz: CSC 15 Spring 2021 Exam 1
https://csus.instructure.com/courses/72516/quizzes/340451/take?preview=1
2/9
14 84 98
0 0 0
7 21 28
7 1 8
10 pts
Question 3
4
public static void main(String[] args) { m2(); m1(); } // this is the beginning of the method m1
{ System.out.println("The wheels on the bus"); } //
end of the method m1 //
this is the beginning of the method m2
{ m1(); System.out.println("Go Round and Round"); m1(); }//
this is the end of the method m2
1. The wheels on the bus Go Round and Round The wheels on the bus The wheels on the bus 2. The wheels on the bus The wheels on the bus Go Round and Round The wheels on the bus 3. The wheels on the bus The wheels on the bus Go Round and Round The wheels on the bus The wheels on the bus 4. The wheels on the bus The wheels on the bus Go Round and Round The wheels on the bus The wheels on the bus
9/28/21, 4:25 PM
Quiz: CSC 15 Spring 2021 Exam 1
https://csus.instructure.com/courses/72516/quizzes/340451/take?preview=1
3/9
2
3
1
20 pts
Question 4
Gina thinks she has a fever. In her home country, temperature is measured in
Celsius but her thermometer shows her temperature in Fahrenheit . Gina wants to
convert her temperature to Celsius so that she knows how high her fever is . write a
program to create the following table so that she can have it as a reference to convert
her temperature from Fahrenheit to Celsius
The conversion formula is : c = (F - 32) * 5 / 9 ( F is the temperature in
Fahrenheit)
must use variables for every literal value that you use in your program.
must use a class constant in your program
must use a for loop
must have the main method
must have a method to create the table Here is a sample output
Fahrenheit Celsius 97 36.111111111111114 98 36.666666666666664 99 37.22222222222222 100 37.77777777777778 101 38.333333333333336 102 38.888888888888886 103 39.44444444444444 104 40.0
Edit
View
Insert
Format
Tools
Table
12pt
Paragraph
9/28/21, 4:25 PM
Quiz: CSC 15 Spring 2021 Exam 1
https://csus.instructure.com/courses/72516/quizzes/340451/take?preview=1
4/9
p
0 words
</>
9 pts
Question 5
What is the output of the following lines of code:
Enter three lines of output, one per line
System.out.println("\"Quotes\""); System.out.println("Slashes \\//"); System.out.println("How '\"confounding' \"\\\" it is!");
Edit
View
Insert
Format
Tools
Table
12pt
Paragraph
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Truth table:
Please make sure the truth table is correct and it has no mistakes.
Correct the truth table if there are mistakes.
arrow_forward
In PYTHON
Print values from the Goal column only
Print values only for columns: Team, Yellow Cards and Red Cards
Find and print rows for teams that scored more than 6 goals
Select the teams whose name start with a G
Print values only for columns Team and Shooting Accuracy , and only for rows in which the team is either of the following: England, Italy and Spain
Find and print rows for teams that scored more than 6 goals and at least 4000 passes
arrow_forward
Correct answer will be appreciated.else downvoted.
arrow_forward
In PYTHON
Print values from the Goal column only
Print values only for columns: Team, Yellow Cards and Red Cards
Find and print rows for teams that scored more than 6 goals
Select the teams whose name start with a G
Print values only for columns Team and Shooting Accuracy , and only for rows in which the team is either of the following: England, Italy and Spain
Find and print rows for teams that scored more than 6 goals and at least 4000 passes
Team
Goals
Shots on target
Shots off target
Shooting Accuracy
Goals-to-shots (perc)
Total shots (inc. Blocked)
Hit Woodwork
Penalty goals
Penalties not scored
Headed goals
Passes
Passes completed
Passing Accuracy
Touches
Crosses
Dribbles
Corners Taken
Tackles
Clearances
Interceptions
Clearances off line
Clean Sheets
Blocks
Goals conceded
Saves made
Saves-to-shots ratio
Fouls Won
Fouls Conceded
Offsides
Yellow Cards
Red Cards
Subs on
Subs off
Players Used
Croatia
4
13
12
0.5
0.16
32
0
0
0
2
1076
828
0.769
1706
60…
arrow_forward
* Question Completion Status:
Moving to another question will save this response.
Quèstion 5
Simplified form of F=y +x y+y xz is
xy + y +
x Z
xy + y (1 + y z)
xy +y (x+y z)
xy +y +xz
A Moving to another question will save this response.
arrow_forward
Overview: Create a coin flip game that allows the user to guess whether the coin will be heads or tails. Save the data associated with the flip. Repeat for a total of 10 guesses/flips. Display result summary and details at end.
Technical Requirements:
Participant will guess whether a coin flip will result in Heads or Tails
Computer will "flip" a coin to determine the side it lands using random generator
import random at top of program
result = random.randint(x,x)
The program will display the results: Guess, Flip, Outcome (Match or No Match)
The program will track the results and, when the game is over, display:
Summary
Detailed result of each turn
Use parallel arrays to collect details from each turn that can be displayed as a table when the game is over
Use running totals of each result detail to display at end
arrow_forward
Favorite Color
Rank the following colors according to your preference with 1 being the most preferred and 5 the least preferred color.
Survey Result: (50 respondents)
Favorite Color Ranking
1st
2nd
3rd
4th
5th
Blue
8
7
9
15
11
Red
16
9
7
9
9
Yellow
11
14
11
5
9
Violet
4
11
17
10
8
Green
11
9
6
11
13
Instructions: Create a preference schedule for the rankings cast by your respondents.
arrow_forward
2. Big, Bigger, Biggest
by CodeChum Admin
Welcome to a game of Big, Bigger, and Biggest! The
game where we give you three big numbers and
you're going to choose which one is the biggest. Do
your worst!
Input
1. First integer
Constraints
This is guaranteed to be a whole number.
2. Second integer
Constraints
This is guaranteed to be a whole number.
3. Third integer
Constraints
This is guaranteed to be a whole number.
Output
The first line will contain a message prompt to input
the first number.
arrow_forward
Java Programming Project
You need to make an exam application in the project. Write the project using JavaFX. Do
not use a database. Accordingly, what is requested must be performed:
1. Adding questions to the question bank: different types of questions should be
added to the question bank. Question types include multiple choice, True/False, fill-in,
and classic type questions. It is mandatory to use inheritance and polymorphism in
writing classes related to questions and in using their objects.
For example, a multiple choice question should have the following information:
a) question text
b) answer options such as a, b, c, d
c) answer
d) points
e) degree of difficulty (such as easy, normal and difficult)
In the upper classes, taking into account the content of other types of questions and
subclasses must be determined which properties should be.
2. Removing a question from a question bank: finding a question that will be deleted
first when removing a question from a question bank it…
arrow_forward
1. Come and Get Sum
by CodeChum Admin
You think you're smart huh? I bet you cant add even add
two numbers together! Prove me wrong and I might just
back off.
Input
1. The first integer
Constraints
This is a whole number.
2. The second integer
Constraints
This is a whole number.
Output
The first line will contain a message prompt to input the
first integer.
The second line will contain a message prompt to input
the second integer.
The last line will contain the whole equation with the
sum.
Enter the first - number: 1
Enter the second- number: 2
1.+23
arrow_forward
fill in the crossword
arrow_forward
Interval Selection: Please help me with this TypeError
arrow_forward
An ISBN (International Standard Book Number) is a 10 digit number that is used to identify a book. The first nine digits of the ISBN number are used to represent the Title, Publisher and Group of the book and the last digit is used for
checking whether ISBN is correct or not. To uniquely identify a book a 10-digit ISBN number is used. The rightmost digit is checksum digit. This digit is determined from the other 9 digits using condition that 10d, + 9dz + 8dg + + d4o
must be a multiple of 11 (where d, denotes the i" digit from the right). The checksum digit d; can be any value from 0 to 10: the ISBN convention is to use the value X to denote 10. Write a C program using pointers that receives a 10-
digit ISBN, and computes the checksum, and reports whether the ISBN number is correct or not.
Example: 007462542X = 10°0 + 9*0 + 8*7 + 74 + 6*6 + 5*2 + 4*5 + 3"4 + 2*2 + 110 = 176
Since 176 leaves no remainder when divided by 11, hence it is a valid ISBN.
Note: When the check digit turns out…
arrow_forward
* Question Completion Status:
Moving to another question will save this response.
Question 1
The 2's complement of -29 is 11100011
O True
O False
A Moving to another question will save this response.
arrow_forward
Need correct with explanation
Else skip it
Proper explanation got thumbs-up
arrow_forward
question is attached as picture
arrow_forward
Inheritance and Polymorphism
This assignment starts with the Account class from Labs 4 and 5. Our new and improved bank
has two kinds of accounts, savings, and checking. In addition to an ID and a balance, savings
accounts have an annual interest rate and a minimum balance. Checking accounts have a
minimum balance and a monthly fee. Withdrawals and deposits can be made to both kinds of
accounts. At the end of each month, savings accounts pay interest, but only if the account's
balance is above the minimum. Also at the end of each month, a fee is deducted from each
checking account, but the fee is waived if the account's balance is over the minimum.
Tasks
1. Create a complete UML diagram which shows the relationships between the three classes,
Account, Savings, and Checking and all of the fields and methods in each. The only
modifications required to the Account class is the addition of two abstract methods called
closeMonth and accountString.
2. The closeMonth function performs the…
arrow_forward
With proper explanation else skip
Proper explanation got thumbs-up
arrow_forward
Upvotes for the correct answer. Else downvoted
arrow_forward
Assignment details:
Replace all the 0 (Zero) digits in your ID by 4.
Example: If your ID is 38104680, it becomes 38144684
Take the first 6 digits and substitute them in this expression (( A + B) / C) * ((D-E)/F)-2) according to the following table;
Letter
Replace by Digit
Example Digit
A
1st
3
B
2nd
8
C
3rd
1
D
4th
4
E
5th
4
F
6th
6
After substitution your expression will be similar to this (( 3 + 8) / 1) * ((4-4)/6)-2).
Draw a rooted tree that represents your expression. [3 marks]
What is the prefix form of this expression.
What is the value of the prefix expression obtained in step 2 above?
arrow_forward
Question 7
2 points
Save Answer
A license plate has 7 characters. Each character can be a capital letter or a digit except for 0. How many license plates are there in which no
character appears more than once and the first character is a digit?
9*356
C(25,7)
O 9*P(34,6)
O 9*P(35,6)
O 9*346
arrow_forward
Case study:
You are required to develop an application to keep track of meeting minutes. Every time a formal meeting takes
place, corresponding meeting minutes should be generated. Each meeting has a list of participants, which the
system receives from the caller of the meeting. The caller also assigns the role of meeting secretary to one of the
participants. The contents of the minutes are usually text, however, images and audio clips can also be attached to
the minutes. The number of attachments is not limited. For each meeting, minutes can only be created by the
assigned meeting secretary (for that meeting), who is also responsible for uploading the attachments. Minutes can
be created incrementally. Once the secretary is satisfied with his/her draft, the minutes can be broadcast to the
participants, who can then make comments on the minutes. Participants can make comments on the minutes as a
whole. These are global comments. They can also select particular sections of the minutes…
arrow_forward
Question is attached.
arrow_forward
VBA PROBLEM:
Create a code where every time that only cell B1 is changed, create a new tab and that this tab is renamed with the value that is entered in B1 and the other cells, that is, B2: B11 have the same values that are entered in the Sheet1. The values of A1: A11 must always remain the same. Like in the examples below (image 1 and 2).
arrow_forward
By default, the first item to be shown in the drop-down list is
Pick a college :
Choose a college
Richfield
PC Training
Select one:
a. college
O b. Choose a college
O c. PC Training
O d. Richfield
arrow_forward
Monthly Sales
Create a program that allows you to view and edit the sales amounts for each month of the current year.
Example
COMMAND MENU
add - Add sales for specified month
view - View sales for specified month
edit - Edit sales for specified month
totals - View sales summary for year
exit - Exit program
Command: add
Three-letter Month: jan
Sales Amount: 10317
Sales amount for Jan is 10,317.00.
Command: add
Three-letter Month: feb
Sales Amount: 15293
Sales amount for Jan is 15,293.00.
Command: view
Three-letter Month: jan
Sales Amount: 14317
Sales amount for Jan is 14,317.00.
Command: edit
Three-letter Month: jan
Sales amount for Jan is 14,317.00.
Command: totals
Yearly total: 29,610.00
Monthly average: 14,805.00
Command: view
Three-letter Month: july
Invalid three-letter month.
Command: exit
Bye!
Specifications
The program should use a list to store the sales data for each month with the three-letter abbreviation for the month (Jan,…
arrow_forward
Transcribed Image Text
A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attending the morning session, and the list afternoonList contains the names of all children attending the afternoon session. Only children who attend both sessions eat lunch at the camp. The camp director wants to create lunchList, which will contain the names of children attending both sessions. The following code segment is intended to create lunchList, which is initially empty. It uses the procedure IsFound (list, name), which returns true if name is found in list and returns false otherwise. FOR EACH child IN morningList { <MISSING CODE> Which of the following could replace <MISSING CODE> so that the code segment works as intended? IF (IsFound (afternoonList, child)) { A APPEND (lunchList, child)
arrow_forward
Employee view attendance report
The employee must be logged in to the
system to perform this function. The
employee selects the report period (range
of dates: from - to). The employee selects
"show report". Range of dates for the
report must be maximum 3 months, so if
the range is invalid, the system displays an
error message. The system displays every
working day in the report with the status
of the employee in this day, which could
be one of the following: on time, late, did
not come.
One actor?
One use case name?
One class ?
Attributes for the class ?
One relation between classes ?
arrow_forward
Use the upload link afler Question 26 to splead the answer. (Image, werd, pdf, or awy
practical files)
l Ci pdf ls 44 26
Write a Pseudocode for the given problem:
Read the bill amount from customer. If the bill amount is above 50 OMR, the discount will
be calculated as 10% of the bill amount, otherwise, the discount is 5% of the bill. Display
the final bill amount after discount.
BI
Use the upload link after Question 26 to upload the answer. (image, word, pd, or any
practical files)
a C pdf s sy A a 26 ll ny Sas pid
What is network protocol2 Explain the following network protocols fin vour own words
arrow_forward
NEXIGO
prial 5 - Merge COMP1005A
COMP1005-F21 Tutorial 5-B1
N 넷블릭스
ca/d21/le/content/82886/viewContent/2138118/View
Hangman Game
Write a program called hangman.py that will contain problems 1-4.
Problem 1
Write a program called p1.py. Create two global variables, one to store the number of incorrect
guesses and a second to store a word (example: koala).
Page 1 of 6
Write a function called print hangman () that takes no arguments and prints a hangman
corresponding to the number of incorrect guesses (use the global variable).
Example:
x = 4
# number of incorrect guesses
print_hangman ()
/6
arrow_forward
v Question Completion Status:
A Moving to another question will save this response.
Question 25
Which of the following propositions is tautology?
O (p v q)-q
O pv (q-p)
O pv (p-q)
O p-q
A Moving to another question will save this response.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Related Questions
- Truth table: Please make sure the truth table is correct and it has no mistakes. Correct the truth table if there are mistakes.arrow_forwardIn PYTHON Print values from the Goal column only Print values only for columns: Team, Yellow Cards and Red Cards Find and print rows for teams that scored more than 6 goals Select the teams whose name start with a G Print values only for columns Team and Shooting Accuracy , and only for rows in which the team is either of the following: England, Italy and Spain Find and print rows for teams that scored more than 6 goals and at least 4000 passesarrow_forwardCorrect answer will be appreciated.else downvoted.arrow_forward
- In PYTHON Print values from the Goal column only Print values only for columns: Team, Yellow Cards and Red Cards Find and print rows for teams that scored more than 6 goals Select the teams whose name start with a G Print values only for columns Team and Shooting Accuracy , and only for rows in which the team is either of the following: England, Italy and Spain Find and print rows for teams that scored more than 6 goals and at least 4000 passes Team Goals Shots on target Shots off target Shooting Accuracy Goals-to-shots (perc) Total shots (inc. Blocked) Hit Woodwork Penalty goals Penalties not scored Headed goals Passes Passes completed Passing Accuracy Touches Crosses Dribbles Corners Taken Tackles Clearances Interceptions Clearances off line Clean Sheets Blocks Goals conceded Saves made Saves-to-shots ratio Fouls Won Fouls Conceded Offsides Yellow Cards Red Cards Subs on Subs off Players Used Croatia 4 13 12 0.5 0.16 32 0 0 0 2 1076 828 0.769 1706 60…arrow_forward* Question Completion Status: Moving to another question will save this response. Quèstion 5 Simplified form of F=y +x y+y xz is xy + y + x Z xy + y (1 + y z) xy +y (x+y z) xy +y +xz A Moving to another question will save this response.arrow_forwardOverview: Create a coin flip game that allows the user to guess whether the coin will be heads or tails. Save the data associated with the flip. Repeat for a total of 10 guesses/flips. Display result summary and details at end. Technical Requirements: Participant will guess whether a coin flip will result in Heads or Tails Computer will "flip" a coin to determine the side it lands using random generator import random at top of program result = random.randint(x,x) The program will display the results: Guess, Flip, Outcome (Match or No Match) The program will track the results and, when the game is over, display: Summary Detailed result of each turn Use parallel arrays to collect details from each turn that can be displayed as a table when the game is over Use running totals of each result detail to display at endarrow_forward
- Favorite Color Rank the following colors according to your preference with 1 being the most preferred and 5 the least preferred color. Survey Result: (50 respondents) Favorite Color Ranking 1st 2nd 3rd 4th 5th Blue 8 7 9 15 11 Red 16 9 7 9 9 Yellow 11 14 11 5 9 Violet 4 11 17 10 8 Green 11 9 6 11 13 Instructions: Create a preference schedule for the rankings cast by your respondents.arrow_forward2. Big, Bigger, Biggest by CodeChum Admin Welcome to a game of Big, Bigger, and Biggest! The game where we give you three big numbers and you're going to choose which one is the biggest. Do your worst! Input 1. First integer Constraints This is guaranteed to be a whole number. 2. Second integer Constraints This is guaranteed to be a whole number. 3. Third integer Constraints This is guaranteed to be a whole number. Output The first line will contain a message prompt to input the first number.arrow_forwardJava Programming Project You need to make an exam application in the project. Write the project using JavaFX. Do not use a database. Accordingly, what is requested must be performed: 1. Adding questions to the question bank: different types of questions should be added to the question bank. Question types include multiple choice, True/False, fill-in, and classic type questions. It is mandatory to use inheritance and polymorphism in writing classes related to questions and in using their objects. For example, a multiple choice question should have the following information: a) question text b) answer options such as a, b, c, d c) answer d) points e) degree of difficulty (such as easy, normal and difficult) In the upper classes, taking into account the content of other types of questions and subclasses must be determined which properties should be. 2. Removing a question from a question bank: finding a question that will be deleted first when removing a question from a question bank it…arrow_forward
- 1. Come and Get Sum by CodeChum Admin You think you're smart huh? I bet you cant add even add two numbers together! Prove me wrong and I might just back off. Input 1. The first integer Constraints This is a whole number. 2. The second integer Constraints This is a whole number. Output The first line will contain a message prompt to input the first integer. The second line will contain a message prompt to input the second integer. The last line will contain the whole equation with the sum. Enter the first - number: 1 Enter the second- number: 2 1.+23arrow_forwardfill in the crosswordarrow_forwardInterval Selection: Please help me with this TypeErrorarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L