1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Serga [27]
2 years ago
5

b. Write a complete program for the following situation related to setting the speed of a car to preset values before starting a

journey: • If speed is less than lower_ set_ speed, display the message "accelerate" to the screen, increase the car's speed to the lower set speed, and output the new speed to the screen. • If speed is greater than upper_set_speed, print the message "apply brake" to the screen, decrease the car's speed to the upper set speed, and output the new speed to the screen. • Give all necessary documentation in the comments, including the file name. • Allow the program to exit at the end. • Output the speed to the screen. • How many different initial speeds will you need to test this code?
Computers and Technology
1 answer:
Orlov [11]2 years ago
3 0

Answer:

U will need 4

Explanation:

You might be interested in
Convert the following numbers. (Please show all steps; no marks will be awarded if no steps are shown) [1.5 x 4 = 6 marks]
katen-ka-za [31]

Answer:

i. 10210212

ii. 100 101 001 in BASE 2

iii. 46.4631

iv. 12.453125

Explanation:

i. Converting to base 10 we get

=  10 x 162 + 13 x 161 + 9 x 160 = 2777

Converting to base 10 we get  =

2777/3 = 925 with remainder 2

925/3 = 308 with remainder 1

308/3 = 102 with remainder 2

102/3 = 34 with remainder 0

34/3 = 11 with remainder 1

11/3 = 3 with remainder 2

3/3 = 1 with remainder 0

1/3 = 0 with remainder 1

Hence the Answer is 10210212

ii. = Octal is taken in pair of 3 bits , Writing binary of each number in 3 bits we get  = 100 101 001 in BASE 2

iii. = 1 x 52 + 2 x 51 + 3 x 50 + 3 x 5-1   = 38.6 in decimal

Converting to Octal we get

38 /8 = 4 with remainder 6

4 /8 = 0 with remainder 4

.6 x 8 =  4.8

.8 x 8 = 6.4

46.4631

iv. = 1x 81 + 4 x 80 + 3 x 8-1 + 5 x 8-2   = 12.453125

Check here for Free courses about IT and Management www.eacademy.lk

4 0
3 years ago
Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelp pt.3
Luda [366]

Answer:

i guess option 1

5 0
2 years ago
Review how to write a for loop by choosing the output of this short program.
Natalija [7]

This for loop will output:

0

2

4

The range(3) is all the integers between 0 inclusive and 3 exclusive. 0, 1, 2.

Every iterations through the for loop, we multiply the value of each number by 2 and print it to the console.

0 * 2 = 0

1 * 2 = 2

2 * 2 = 4

I hope this helps.

5 0
3 years ago
Read 2 more answers
(5 pt.) The name of a variable in the C programming language is a string that can contain uppercase letters, lowercase letters,
lilavasa [31]

Answer:

The different variable in C is 21213316700.

Explanation:

Given value:

Total value  = letters + underscore value

Total value  = 52 + 1

Total value =53

choice for first character = 53 letters +10 digits

first character = 63

choice for remaining characters

So,

Variable number With one 1 character = 53

Variable number With 2 character  = 53 × 63

Variable number With 3 character = 53 × 63²

Variable number With 4 character  = 53 × 63³

.

.

.

Variable number With 7 character  = 53 \times  63^{7}

Total difference variable = 53 + 53 × 63+ 53 × 63²+ 53 × 63³+....+ 63^{7}

Total difference variable = 53(1 + 63 + 63²+ 63³+ .... + 63^{7})

Formula:

1+x+x^2+x^3+x^4+........x^n\\\\\Rightarrow  \frac{x^{(n+1)} -1}{x-1}

Total difference variable

53 \times \frac{63^{7+1} -1 }{63-1}\\\\53 \times \frac{63^{8} -1 }{63-1} \\\\ \therefore 63^8 = 2.48 \times 10^{14}\\\\53 \times \frac{2.48 \times 10^{14} -1  }{62}\\\\53 \times \frac{1.48 \times 10^{14}}{62}\\\\21213316700

6 0
3 years ago
A STUDENT can take many COURSES and a COURSE can have more than one STUDENT enrolled in the course. In this case, both the "stud
Marina CMI [18]

Answer:C. To eliminate possible data redundancy.

Explanation:Data redundancy is a term used in data management system or process to mean the storage of the same data in different locations, this type of situation need to prevented for effective and efficient data management system or process.The main reason for creating a new entity is to eliminate the possibility of data redundancy which not desireous and not required.

8 0
3 years ago
Other questions:
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • When ordering a new​ zagflatz, customers must choose the style of three major​ components, each of which has about ten variation
    6·1 answer
  • What are the advantages and disadvantages of the simulated link strategy?
    11·1 answer
  • In this question, we give two implementations for the function: def intersection_list(lst1, lst2) This function is given two lis
    15·1 answer
  • ______ includes websites that encourage interaction and connection among people, businesses, and organizations.
    9·2 answers
  • In this exercise, you are given a phrase and need to return that phrase in all capital letters.
    6·1 answer
  • I am bad with excell pleasee heelp
    15·1 answer
  • What operating system do most users use?
    13·1 answer
  • The ___________ method returns the length of an array.
    11·2 answers
  • In cyber security, one of the best ways to protect a computer or network is with a strategy called defense in depth. This strate
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!