subject

1. What will be printed by the following code segment? x=15
if x==25:
print ('Pizza is yummy’)
else:
print ('My teacher is awesome')
If x=15 , then double of 15 is x=25

2. What will be printed by the following code segment?
x=35

y=52

if x!=25 and y==52:

print ('Pizza is yummy')

else:

('My teacher is awesome')

3. Correct the errors in the following code to find the least number between x, y and z.
if x > y or y z
if x>z:
print(z)
else print (“x”)

4. Consider the following code:
if a > b:
if b > c:
print("Spam Please")
else:
print("It's a late parrot!")
elif b > c:
print("Cheese Shoppe")
if a >= c:
print("Cheddar")
elif a < b:
print("Gouda")
elif c == b:
print("Swiss")
else:
print("Trees")
if a == b:
print("Chestnut")
else:
print("Larch")
print("Done")
What would the output be for each of the following inputs? (assume they are in order a, b, c)
a) 3, 4, 5
b) 3, 3, 3
c) 5, 4, 3
d) 3, 5, 2
e) 5, 4, 7
f) 3, 3, 2

Programming Exercises
5. Given numbers (a, b, c) determine which number is the smallest, assign it to min, find the largest, assign it to max, and find the middle number and assign it to mid.

Paste code here.

6. A certain teacher gives 100 point exams that are graded on a scale from 0-100. Each grade can be given as a letter grade (90-100 = A, 80-89 = B,70-79 = C, 60-69 = D, <60 = F) . Write a function that will accept a value of a number grade, and will print the letter grade that corresponds to the number range.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:30, Princessirisperez0
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e. g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
image
Computers and Technology, 23.06.2019 14:00, camiserjai1832
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
image
Computers and Technology, 24.06.2019 23:00, Kaziyah461
People should never use telepresence when virtually meeting with a group of co-workers. true false
Answers: 1
image
Computers and Technology, 25.06.2019 02:30, hailee24
What group of plants produce fruit? question 2 options: gymnosperms nonvascular plants seedless vascular plants angiosperms
Answers: 1
You know the right answer?
1. What will be printed by the following code segment? x=15
if x==25:
print ('Pizza is...

Questions in other subjects:

Konu
Mathematics, 02.10.2021 21:30