CQS 311 MIDTERM SHEEt
.pdf
keyboard_arrow_up
School
Binghamton University *
*We aren’t endorsed by this school
Course
311
Subject
Computer Science
Date
Oct 30, 2023
Type
Pages
2
Uploaded by SuperHumanIronYak19
Variables,
Expressions,
and
Statements:
-
Variables
are
named
places
in
memory
where
data
is
stored.
-
Variable
names
must
start
with
a
letter
or
underscore
and
can
consist
of letters,
numbers,
and
underscores.
-
Variables
are
case-sensitive.
-
Assignment
statements
are
used
to
assign
a
value
to
a
variable
(e.g.,
x=5").
-
Expressions
are
combinations
of
values,
variables,
and
operators
that
evaluate
to
a
single
value.
-
Constants
are
fixed
values
like
numbers,
letters,
and
strings
that
don't
change.
-
String
constants
are
enclosed
in
single
(")
or
double
(")
-
Reserved
words
cannot
be
used
as
variable
names.
-
Operators
are
symbols
used
to
perform
operations
(e.g.,
"+
for
addition).
Numeric
Constants:
-
Integers
are
whole
numbers
(e.g.,
14,
-2).
-
Floating-point
numbers
have
decimal
parts
(e.g.,
-2.5,
98.6).
-
Numeric
operations
include
addition
(+),
subtraction
(-),
multiplication
(*),
division
(/),
exponentiation
(**),
and
remainder
(%).
Order
of
Evaluation:
-
Operator
precedence
determines
the
order
of
execution
in
complex
expressions.
-
Use
parentheses
to
explicitly
specify
the
order.
-
Exponentiation
has
the
highest
precedence,
followed
by
multiplication,
division,
addition,
and
subtraction.
Types
in
Python:
-
Variables
and
constants
have
types.
-
Python
knows
the
difference
between
integers
and
strings.
-
Type
affects
how
operators
behave
(e.g.,
"+
means
addition
for
numbers
and
concatenation
for
strings).
-
Type
conversions
can
be
done
using
“int()’,
"float()’,
“str()’
func
User
Input:
-
"input()”
function
reads
data
from
the
user
as
a
string.
-
Use
type
conversion
functions
to
convert
input
to
numbers
if
needed.
Comparison
Operators:
-
Comparison
operators
(e.g.,
<,
<=,
==
produce
Boolean
results.
-
Boolean
expressions
evaluate
to
"True’
or
"False’
#
True
or
True
=
True
#
False
or
True/
True
or
False
=
True
#
False
or
False
=
False
.
-
Comparison
operators
look
at
variables
but
do
not
change
them.
Indentation:
-
Indentation
is
crucial
in
Python.
-
Increase
indentation
after an
"if”
or
“for’
statement.
-
Maintain
indentation
to
define
the
block's
scope.
-
Reduce
indentation
to
end
the
block.
Two-Way
and
Multiway
Decisions:
-
"1f°
statements
allow
two-way
decisions
based
on
conditions.
-
Multiway
decisions
can
be
achieved
using
“elif”
(else
if).
The
“try’/
except”
Structure:
-
Used
to
handle
exceptions
and
errors.
-
Surround
potentially
problematic
code
with
“try’
and
handle
errors
in
the
“except’ block.
Loops
and
Iteration:
-
Loops
are
used
for
repeated
steps.
-
An
1infinite
loop
runs
indefinitely.
\’
\:>::\’
\:>\’
\!::\)
-
Use
"break”
to
exit
a
loop
prematurely.
-
Use
"continue’
to
skip
the
current
iteration
and
start
the
next
one.
Definite
and
Indefinite
Loops:
-
Definite
loops
run
a
fixed
number
of
times.
-
Indefinite
loops
continue
until
a
condition
becomes
"False'.
Functions:
-
Functions
are
reusable
blocks
of
code
that
take
arguments
and
return
results.
-
They
are
defined
using
"def
.
-
Function
calls
use
the
function
name,
parentheses,
and
arguments.
-
Functions
can
return
values
using
‘return’.
-
Parameters
are
variables
in
the
function
definition.
-
Arguments
are
values
passed
to
a
function.
-
Void functions
do
not
return
values.
-
Use
built-in
functions
and
create
custom
functions.
Strings:
->
IMMUTABLE
-
Strings
are
sequences
of
characters
-
with
*”
or
-
Concatenation
with
"+’
joins
strings.
-
Use
'len()"
to
get the
length
of
a
string.
-
Indexing
allows
access
to
individual
characters.
-
Slicing
extracts
continuous
sections
of
a
string.
-
Common
string
functions
include
"find()",
"replace()’,
and
"strip()".
Lists:
->
MUTABLE
-
Lists
are
ordered
collections
that
can
hold
various
data
types.
-
Lists
contents
can
change-
elements
separated
by
commas
-
Use
‘'len()’
to
find
the
number
of
elements
1n
a
list.
-
Combine
lists
with
"+
-uses
Brackets
[
]
-
"append()’
adds
elements
to
a
list
-
adds
it
to
the
end
-
Lists
can
be
sorted
using
“sort()".
Dictionaries:
-~
MUTABLE
-
Dictionaries
are
collections
of
key-value
pairs-
are
unordered
-
Keys
are
used
to
access
values.
key
:
value
-
uses
brackets
{}
-
word
:
meaning-
(key1
:
valuel,
key2
:
value2,
keyn
:
valuen)
-
Use
"get()"
to
retrieve
values
safely
-
cant
index
-keys-
print(sorted(variablename))
-values
-
print(sorted(variablename.values())
-pairs
-
print(sorted(variablename.items())
-
keys
should
be
unique
values
can
be
duplicated
-
Iterate
through
keys
or
key-value
pairs
using
“for'
loops
-keys
can
be
strings
or
numbers,
values
can
be
any
type.
-cannot
be
indexed
by
number
-
it
gives
an
error
Tuples:
-~
IMMUTABLE
-
Tuples
are
ordered
and
immutable
sequences-
uses
parentheses
()
-
Tuples
are
efficient
and
are
often
used
for
temporary
variables.
-
Lists
can
be
sorted
using
the
“sorted()"
function.
[X%4)
LISTS
variable.sort()
#sorts
from
lowest
to
highest
variable.sort(reverse
=
True)
#sorts
from
highest
to
lowest
print(len(variable))
# of
items
in
list
print(max(variable))
#largest
print(min(variable))
#
smallest
print(sum(variablet))
print(sum(variablet)/
len(variable))
#average()
=
total/count
#
Define
the
list
x
=['a’,
'b",
'c’,
'd’,
'e']
#
Select
the
0th
element
in
the
list
x[0]
#
'a'
#
Select
the
last
element
in
the
list
x[-1]
#
'€’
#
Select
1st
(inclusive)
to
3rd
(exclusive)
x[1:3]
#
['b',
'C']
#
Select
the
2nd
to
the
end
x[2:
1
#['c',
'd',
‘e
#
Select
0th
to
3rd
(exclusive)
x[
:3]
#
['a,
'b',
'c]
CHANGING
VALUE
IN
DICTIONARY
print(phone_dict["John"])
phone_dict["John"]
=
"212-2121"
Select
the
left
side
then
use
brackets
and
type
in
what
u
want
to
change
for
item
in
phone_dict:
print(phone_dict[item])
#dictionaryvariable[key]
=
value
LOOPS
FILTERING
numbers
=
[1,2,3,4,5,6,7,8,9,10]
#find
the
square
of
all
even
numbers
#
filter
all
even
numbers
#
find
the
squares
for
value
in
numbers:
#
filter
all
even
numbers
if
value
%
2
==
0:
print(value,
value
**
2)
#
filter
all
odd
numbers
if
value
%
2
1=
0:
print(value,
value
**
2)
STRINGS
-slicing-
#
stringvariable[start
index
:
end
index]
#
start
index
-
inclusive
#
end
index
-
exclusive
-methods-
print(dir(variable))
-find
->
print(variable.find(*
‘)
#
exact
match
-
it
gives
index
of
the
first
char
of
the
match,
#
no
match
-
it
gives
-1
-upper
case
and
lower
case-
print(variable.upper())
print(variable.lower())
-replace
-
:
x
=5
if
x
<
10:
print('smaller')
if
x
>
20:
print('bigger"')
smaller
:
x
=5
for
i
in
range(5):
print(1i)
0
1
2
3
4
:
x
=4
if
x
>
5:
print(‘'bigger')
else:
print('smaller')
print(nstr)
Hello
Jane
HellX
BXb
friends
=
[
'Joseph’,
for
friend
in
friends
:
print('Happy
New
Year:',
print('Done!")
Happy
New
Year:
Happy
New
Year:
Happy
New
Year:
Done!
Joseph
Glenn
Sally
lotto
=
[2,
14,
lotto[2]
=
28
print(lotto)
[2,
14,
28,
41,
63)
x=11,
2,
"joe',
99]
print(len(x))
4
while
True:
line
=
input('>
')
if
line
==
'done'
:
break
print(line)
print('Done!’)
'Glenn’,
26,
41,
63]
t;
[ERIy
e
x
=
20
if
x
<
103
print(‘'small’)
elif
x
<
15:
print('medium')
else:
print('large’)
large
astr
=
'Hello
Bob'
try:
istr
=
int(astr)
except:
istr
=
-1
print('First',
istr)
astr
=
'123'
try:
istr
=
int(astr)
except:
istr
=
-1
print('Second',
istr)
First
-1
Second
123
smaller
greet
=
'Hello
Bob'
:
-
[i'
2,
3]
nstr
=
greet.replace('Bob',
'Jane’)
c
;
:
;
i'
6]
print(nstr)
print(c)
nstr
=
greet.replace('o','X")
t
=
[9,
41,
12,
3,
print(t[1:3])
‘sally']
141,
12]
friend)
stuff
=
list()
word
=
'banana'
count
=
0
for
letter
in
word
:
def
addtwo(a,
b):
added
=
a
+
b
return
added
if
letter
==
'a'
:
count
=
count
+
1
print(count)
X
=
addtwo(3,
5)
print(x)
3
8
a
=
'Hello'
fruit
=
'banana’
b
=
a
+
'There’
letter
=
fruit[l]
print(b)
print(letter)
c=a+
'
'
+
'There'
print(c)
i
A
w
=
fruit[x
-
1]
HelloThere
print(w)
Hello
There
a
n
greet
=
'Hello
Bob'
zap
=
greet.lower()
print(zap)
fruit
=
'banana’
print
(greet.upper())
index
=
0
print('Hi
There'.lower())
while
index
<
len(fruit):
letter
=
fruit[index]
print(index,
letter)
hello
bob
index
=
index
+
1
HELLO
BOB
hi
there
0
b
la
2n
3
a
4
n
5
a
74,
15)
stuff.append('book")
stuff.append(99)
print(stuff)
[
'book',
99]
friends
=
[
friends.sort()
print(friends)
['Glenn’,
'Joseph’,
‘Joseph’,
'Glenn',
'Sally'
]
‘sally')
i
|lx
=
(9,
8,
7]
:
purse
=
dict()
purse[
'money’
]
2
purse[
'candy’']
purse[
'tissues’
print
(purse)
print(purse[
'candy'])
1
3
-0
79
{
'money"’
:
3
12,
'candy':
3,
‘chuck’
:
1
,
'tissues':
'fred'
x[2]
=
6
print(x)
[9,
8,
6]
75}
:
42,
'jan':
100}
for
aaa,bbb
in
jjj.items()
:
print(aaa,
bbb)
chuck
1
fred
42
jan
100
print(variable.replace("
",
"))-
doesn't
actually
change
#
strip(),
Istrip(),
rstrip()
-
remove
whitespaces
print(variable.strip())
#
remove
all
whitespace
on
left
and
right
print(variable.Istrip())
#
remove
all
white
space
on
left
side
print(variable.rstrip())
#
remove
all
white
space
on
right
side
Aaf
+hinal).
print('Hello')
print('Fun’)
thing()
print('zip')
thing()
Hello
Fun
Zin
click
to
expand
output;
double
click
to
hide
output
Fun
def
print_lyrics():
print("I'm
a
lumberjack,
and
I'm
okay.")
print('I
sleep
all
night
and
I
work
all
day.'
print_lyrics()
I'm
a
lumberjack,
and
I'm
okay.
I
sleep
all
night
and
I
work
all
day.
def
greet():
return
"Hello"
print(greet(),
"Glenn")
print(greet(),
"Sally")
Hello
Glenn
Hello
Sally
astr
=
'Bob'
try:
print('Hello')
istr
=
int(astr)
print('There')
except:
istr
=
-1
print('Done’',
istr)
Hello
Done
-1
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
C Language thanks
arrow_forward
algorithm and programming
Program Use the language C
arrow_forward
Power Calculator
Java Script
Create a function that takes voltage and current and returns the
calculated power.
Examples
circuitPower (230, 10) → 2300
circuitPower (110, 3) → 330
circuitPower (480, 20) → 9600
arrow_forward
Quizzes
Grades
2. Area of a Circle
Computer programs are great at computing mathematical formulas. Once the formula is properly encoded you can use the code as much as you want without reprogramming it and you
can share it with non-programmers without any trouble. This lab is an example of such a formula. Once you program it you won't have to worry about the area of a circle again.
Syllabus
Zoom
• Write and test a program that computes the area ofa circle. This program should request a number representing a radius as input from the user.
• Use the formula 3.14 x radius to compute the area.
• Tip: There are a couple of ways to code an exponent. Look in the Operators unit for help (and you can't use an x for multiplication).
• Tip: You will need to use the float data type to compute the remainder.
- The output should explain the results. Don't just print a number.
• Tip: For your print statement you will need to use the comma, or plus, +symbols to stitch your output together.
- (The area…
arrow_forward
Name Format - Use Java
arrow_forward
Number of electoral votes: 200Number of popular votes: 300
arrow_forward
Functions are very important in computer programming since they are the building blocks of the code.
arrow_forward
Variables are a kind of data that may be changed.
arrow_forward
ASSIGNMENT BRIEF
Introduction
Roulette is a popular casino game named after the French word for 'little wheel'. In the game, players
may choose to place bets on single numbers or various groupings which will determine their payout.
To determine the winning number a ball is spun in the opposite direction of a spinning wheel. As the
ball loses momentum it comes to rest in one of the slots of the wheel.
Winnings are then paid to anyone who places a successful bet.
n 00
2.
1ST12
2ND12
3RD12
1T018 EVEN
ODD |19то36
Figure 1: Layout of a European roulette table
Numbers can be classified in several ways:
1. Red or Black
2. Odd or Even
3. High or Low - if a number is in the first half of the table it is considered low (1-18).
If a number is in the second half of the table, it is considered high (19-36).
4. Dozens - a number can be in the first dozen(1-12), second dozen (13-24) or third dozen (25-36)
5. Columns - A number may be in any of the three columns of the table
6. Zero - the number '0'…
arrow_forward
In the realm of computer programming, what purpose does "good enough" serve?
arrow_forward
Personal library softwareTo develop a software that would be used by individuals to manage their personal collection of books.A person can have up to a few hundreds of books. The details of all the books such as name of the book,year of publication, date of purchase, price, and publisher would be entered by the owner. A book shouldbe assigned a unique serial number by the computer. This number would be written by the owner usinga pen on the inside page of the book. Only a registered friend can be lent a book. While registering afriend, the following data would have to be supplied—name of the friend, his address, land line number,and mobile number. Whenever a book issue request is given, the name of the friend to whom the book isto be issued and the unique id of the book is entered. At this, the various books outstanding against theborrower along with the date borrowed are displayed for information of the owner. If the owner wishesto go ahead with the issue of the book, then the date of…
arrow_forward
LISP Function help please
LISP Programming only
A function that generates a random day of the week, then displays a message saying that "Today is ... and tomorrow will be ...".
Then use the built-in function random first to generate a number between 0 and 6 (including). The expression (random) by itself generates a random integer. You can call it with one parameter to return a value within the range from 0 to the value of the parameter-1. For example, (random 10) will return a value between 0 and 9.
Next, use the number generated at the previous step to retrieve the symbol for the day of the week from the list. Use the built-in elt.
Extract the symbol-name of the day first, then apply the built-in function capitalize to it. Use the result in the princ function call, and do the same thing for the next day.
Make the function return true (t) instead of the last thing it evaluates, to avoid seeing the message printed more than once.
arrow_forward
True or False
The nouns in a problem description may indicate some of the methods needed in a program.
arrow_forward
Use C Programming Language and Struct
arrow_forward
C# PROGRAMMING
OOP1 - Objects, Classes, and Encapsulation
Create a program that has the following method and corresponding usage.
1. PerimeterTriangle - compute the perimeter of a triangle
arrow_forward
Instructions
Assuming you are registered in a class with several activities/categories (quizzes, labs, homework, attendance, etc.), you would like to keep track of your grades throughout the quarter. For each category, you need to add your grade, e.g., for the labs you got 100 in lab 1, 95 in lab 2, etc.
How are we going to store our grades for each category?
Remember that in our main program, we keep the information for various grade categories. This information is stored as a list of lists, which can, for example, look like this:
[["Lab", 35], ["Quiz", 35]]
Each list that is contained in the main “database” (a list of lists) contains information about a category and its corresponding grade percentage.
If for the labs, you got 100 in lab 1, 95 in lab 2, we can store this information for the “Lab” category as an additional list:
["Lab", 35, [100, 95]]
This means that our database would then look like this (note the nesting of the grades):
[["Lab", 35, [100, 95]], ["Quiz", 35]]
In order…
arrow_forward
Functions are essential in computer programming since they are the building blocks of the code.
arrow_forward
For what purpose does "acceptable" come into play during the creation of software?
arrow_forward
python multiple choice
Code Example 4-1
def get_username(first, last):
s = first + "." + last
return s.lower()
def main():
first_name = input("Enter your first name: ")
last_name = input("Enter your last name: ")
username = get_username(first_name, last_name)
print("Your username is: " + username)
main()
5. Refer to Code Example 4-1: What is the scope of the variable named s ?a. globalb. localc. global in main() but local in get_username()d. local in main() but global in get_username()
arrow_forward
c++ oop
arrow_forward
Programming Language :- Python
arrow_forward
object oriented programming (OOP)
write a program that store the 10 numbers and then calculate the sum , average and multiplication of all numbers
arrow_forward
Rolling Dice Simulator [Java Assignment]Objective: Create a Java program that rolls two dice and displays the results. The program should have two Java classes: one for a single die and another for a pair of dice.
Assignment Details:
User Input:
Ask the user to specify the number of sides they want on each die.
Ensure that the user's input is within a reasonable range.
Dice Rolling:
Simulate rolling the dice using Math.random() based on the user's chosen number of sides.
Display the sum of the values rolled, e.g., "5 + 3 = 8."
Special Combinations:
If the dice roll results in combinations of 2, 7, or 12, print special messages:
"1 + 1 = 2 snake eyes!"
"3 + 4 = 7 craps!"
"6 + 6 = 12 box cars!"
Main Method:
In the main method, create a pair of dice, roll them, and display the results.
Allow the user to decide whether to continue rolling the dice or exit the program.
Additional Features:
You are welcome to add more features or enhancements to the program if desired.…
arrow_forward
Identif the data type of x after the statment executes: x = 7 // 2 + 3
int
float
str
arrow_forward
fast please
arrow_forward
-. The popular expression "Divide-And-Conquer"
refers to a kind of
A Top-down design
B Object oriented design
C Algorithmic design
D Modular design
arrow_forward
Restaurant: Point-of-Sales System
Create a software application that can be used for a Restaurant using C language.
The expected minimum functionality are as follows:
Menu Display
It must display at least 10 choices with their corresponding prices
On your menu, at least one of the categories/choice should have customization/add-on.
You should have at least 3 customization/add-on (e.g. In Starbucks, you can have extra espresso shot).
Taking Orders
As a customer, I want to select which of the choices I want to order
As a customer, everytime I specify select my choice, I want to specify the quantity of my selected choice.
After I finished my order, it should ask, "Anything Else?". Afterwards, as a customer, I should be to enter my succeeding choice.
In order to stop taking order, the exit should be part of the menu. As a customer, I would only select that choice to exit
If the customer selects a choice qualified for customization, after specifying the quantity, I should be asked,…
arrow_forward
Assignment Java:
Program Statement:
You are required to model a vehicle parking lot system. The parking lot has a facility to park cars and scooters. The parking lot contains four parking lanes-two for cars and two for scooters.
Each lane can hold ten vehicles. There is an operator with a console at the East end of the parking lot. The system should be able to handle following scenarios.
Arrival of a vehicle:
Type of vehicle (car or scooter) and Registration No. of vehicle should be entered
Program should display suitable parking slot
Vehicles arrive at East end, leave from West end
Departure of Car:
If not western most, all cars should be moved to the west
When the car is driven out, rest of the cars should be moved to the left
Vehicle data should be updated
Departure of Scooter:
Scooters should be able to drive out at random
Vehicle data should be updated
Note that when desired the operator must be able to obtain information like number of vehicles, number of scooters or number…
arrow_forward
Flowchart for student interface program please.
Create a program to enter grades and calculate averages and letter grades.
Need a class which will contain:
Student Name
Student Id
Student Grades (an array of 3 grades)
A constructor that clears the student data (use -1 for unset grades)
Get functions for items a, b, and c, average, and letter grade
Set functions for items a, n, and c
Note that the get and set functions for Student grades need an argument for the grade index.
Need another class which will contain:
An Array of Students (1 above)
A count of number of students in use
You need to create a menu interface that allows you to:
Add new students
Enter test grades
Display all the students with their names, ids, test grades, average, and letter grade
Exit the program
Add comments and use proper indentation.
Nice Features:
I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the final…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Related Questions
- C Language thanksarrow_forwardalgorithm and programming Program Use the language Carrow_forwardPower Calculator Java Script Create a function that takes voltage and current and returns the calculated power. Examples circuitPower (230, 10) → 2300 circuitPower (110, 3) → 330 circuitPower (480, 20) → 9600arrow_forward
- Quizzes Grades 2. Area of a Circle Computer programs are great at computing mathematical formulas. Once the formula is properly encoded you can use the code as much as you want without reprogramming it and you can share it with non-programmers without any trouble. This lab is an example of such a formula. Once you program it you won't have to worry about the area of a circle again. Syllabus Zoom • Write and test a program that computes the area ofa circle. This program should request a number representing a radius as input from the user. • Use the formula 3.14 x radius to compute the area. • Tip: There are a couple of ways to code an exponent. Look in the Operators unit for help (and you can't use an x for multiplication). • Tip: You will need to use the float data type to compute the remainder. - The output should explain the results. Don't just print a number. • Tip: For your print statement you will need to use the comma, or plus, +symbols to stitch your output together. - (The area…arrow_forwardName Format - Use Javaarrow_forwardNumber of electoral votes: 200Number of popular votes: 300arrow_forward
- Functions are very important in computer programming since they are the building blocks of the code.arrow_forwardVariables are a kind of data that may be changed.arrow_forwardASSIGNMENT BRIEF Introduction Roulette is a popular casino game named after the French word for 'little wheel'. In the game, players may choose to place bets on single numbers or various groupings which will determine their payout. To determine the winning number a ball is spun in the opposite direction of a spinning wheel. As the ball loses momentum it comes to rest in one of the slots of the wheel. Winnings are then paid to anyone who places a successful bet. n 00 2. 1ST12 2ND12 3RD12 1T018 EVEN ODD |19то36 Figure 1: Layout of a European roulette table Numbers can be classified in several ways: 1. Red or Black 2. Odd or Even 3. High or Low - if a number is in the first half of the table it is considered low (1-18). If a number is in the second half of the table, it is considered high (19-36). 4. Dozens - a number can be in the first dozen(1-12), second dozen (13-24) or third dozen (25-36) 5. Columns - A number may be in any of the three columns of the table 6. Zero - the number '0'…arrow_forward
- In the realm of computer programming, what purpose does "good enough" serve?arrow_forwardPersonal library softwareTo develop a software that would be used by individuals to manage their personal collection of books.A person can have up to a few hundreds of books. The details of all the books such as name of the book,year of publication, date of purchase, price, and publisher would be entered by the owner. A book shouldbe assigned a unique serial number by the computer. This number would be written by the owner usinga pen on the inside page of the book. Only a registered friend can be lent a book. While registering afriend, the following data would have to be supplied—name of the friend, his address, land line number,and mobile number. Whenever a book issue request is given, the name of the friend to whom the book isto be issued and the unique id of the book is entered. At this, the various books outstanding against theborrower along with the date borrowed are displayed for information of the owner. If the owner wishesto go ahead with the issue of the book, then the date of…arrow_forwardLISP Function help please LISP Programming only A function that generates a random day of the week, then displays a message saying that "Today is ... and tomorrow will be ...". Then use the built-in function random first to generate a number between 0 and 6 (including). The expression (random) by itself generates a random integer. You can call it with one parameter to return a value within the range from 0 to the value of the parameter-1. For example, (random 10) will return a value between 0 and 9. Next, use the number generated at the previous step to retrieve the symbol for the day of the week from the list. Use the built-in elt. Extract the symbol-name of the day first, then apply the built-in function capitalize to it. Use the result in the princ function call, and do the same thing for the next day. Make the function return true (t) instead of the last thing it evaluates, to avoid seeing the message printed more than once.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Browse Popular Homework Q&A
Q: The block is at rest as shown. What is the peiod of the oscillation if the block is pulled down by…
Q: thermocouple operates on the principle of temperature difference between the measuring and reference…
Q: Can i get help step by step please?
Q: recent survey found that 60% of all adults wear sunglasses for driving. In a random sample of 10…
Q: Assume that intelligence follows a normal distribution and that on a standard test for
intelligence…
Q: Explain the relationship between tests of the acquisition and payment cycle and tests of inventory.…
Q: Find the maximum for this list of numbers
43
14
54
10
38
63
86
92
25
68
20
50
18
48
59
Q: 6. Use properties of logarithms to condense the logarithmic expression below. write the expression…
Q: 2.) A group of students in a mathematics class were asked whether they participated in the past 3…
Q: Analyze the effect of the Baby Boomers retirement on the supply and demand for financial capital:…
Q: Janelle was able to describe her friend's personality quickly and accurately. When describing her…
Q: Display the current day of the week, hour, minutes, and seconds of the current date setting
on the…
Q: describe each of the 10 generally accepted auditing standards and indicate how the action(s) of…
Q: Question 19 81
View Policies
Current Attempt in Progress
Use heats of formation data bellow to…
Q: QUESTION 10
1:1/1
Rung 1 36
C5:1/DN
Rung 2E
Rung 3
Rung 4
C5:1/DN
1:1/2
36
-CTU-
COUNT-UP COUNTER…
Q: Create a view that lists the name and phone number of the contact person at each
publisher. Don’t…
Q: M, a solid cylinder (M=2.27 kg, R=0.131 m)
pivots on a thin, fixed, frictionless bearing. A
string…
Q: What is the fundamental distinction between a node and a host?
Q: Consider the triangle shown in the figure.
y (cm)
11
10
8
7
6
5
4
3
2
1
0
012 3 4 5 6 7 89 10 11
x…
Q: Test the hypothesis that the proportion of Elementary School Districts being Anderson has increased…
Q: The compoind CuNO3 is named:
a) Copper (I) Nitrate
b) Copper (II) Nitrate
c) Copper (II) Nitrite…
Q: At a large publishing company, the mean age of proofreaders is 36.2 years and the standard deviation…
Q: For the problem related to Fundamental.4, a sketch of the considered system showing and naming (or…
Q: In a sample of 120 adults, 114 had children. Construct a 99% confidence interval for the true…
Q: price increases by 9% due to inflation and is then reduced by 10%
· a sale. Express the final price…