Computers and Technology, 08.10.2021 05:00 zoeybuch5
1. The following pseudocode tests how quickly a user can type a given sentence without making any mistakes.
The statement time. clockTick() returns the number of seconds elapsed since the program started followed by the number of characters in the sentence typed.
1 sentence β "The quick brown fox jumped over the lazy dog"
2 n β LEN(sentence)
3 OUTPUT "Sentence to type: " + sentence
4
5 mistakeMade β False
6
7 OUTPUT "Press Enter when you're ready to start typing! Press Enter when finished"
8 ready β USERINPUT
9 OUTPUT "Go!"
10
11 startTime β time. clockTick()
12 mySentence β USERINPUT
13 finishTime β time. clockTick()
14 totalTime β finishTime - startTime
15
16 IF mySentence β sentence THEN
17 mistakeMade β True
18 ENDIF
19 IF mistakeMade THEN
20 OUTPUT "You made one or more errors"
21 ELSE
22 OUTPUT totalTime
23 OUTPUT n
24 ENDIF
(a) What type of variable is each of the following? [4]
(i) mistakeMade
(ii) n
(iii) totalTime
(iv) sentence
(b) What does line 16 do? [2]
(c) Alter the program so that instead of storing the sentence βThe quick brown fox jumped over the lazy dogβ, the user can enter the sentence on which they will be timed. [3]
Answers: 2
Computers and Technology, 21.06.2019 17:00
Which process would best represent the opposite of exhausting air from a system?
Answers: 2
Computers and Technology, 22.06.2019 09:30
My mom and i are moving and we donβt have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. iβm considering cost, speed, and data sacrifices.
Answers: 1
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
Computers and Technology, 22.06.2019 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
1. The following pseudocode tests how quickly a user can type a given sentence without making any mi...
Social Studies, 24.03.2021 05:10
Chemistry, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10
Social Studies, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10
Engineering, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10
Biology, 24.03.2021 05:10
Mathematics, 24.03.2021 05:10