MCPcopy Create free account

hub / github.com/Polkadot-Blockchain-Academy/pba-qualifier-exam / functions

Functions110 in github.com/Polkadot-Blockchain-Academy/pba-qualifier-exam

↓ 12 callersFunctionsanity_check
(f: &dyn Fn() -> char)
src/b_multiple_choice.rs:300
↓ 6 callersFunctionhas_honor
(f: &dyn Fn() -> bool)
src/a_honor_code.rs:74
Functionanswer_1_a
# Multiple Choice Questions This portion of the exam is to be completed without accessing the internet, books, the rust compiler, or any other resour
src/b_multiple_choice.rs:41
Functionanswer_1_a_sanity_check
()
src/b_multiple_choice.rs:309
Functionanswer_1_b
### Question 1_B Why can the variable `y` be reassigned in the last line when it was not declared as `mut`? - a) Mutable variables are the default.
src/b_multiple_choice.rs:54
Functionanswer_1_b_sanity_check
()
src/b_multiple_choice.rs:314
Functionanswer_1_c
### Question 1_C What is the value of `z` at the end of the program? - a) 1 - b) -1 - c) 4294967295 (u32 max value) - d) 0 - e) 511
src/b_multiple_choice.rs:67
Functionanswer_1_c_sanity_check
()
src/b_multiple_choice.rs:319
Functionanswer_1_d
### Question 1_D Which of the following is not a valid looping construct in Rust? - a) `do {} while x > 0` - b) `for _ in 1..2 {}` - c) `while x > 0
src/b_multiple_choice.rs:80
Functionanswer_1_d_sanity_check
()
src/b_multiple_choice.rs:324
Functionanswer_2
## Question 2 Consider this Rust code: ```notest /// Check whether a value is between 5 and 10, and return a user-readable /// string explaining the
src/b_multiple_choice.rs:112
Functionanswer_2_sanity_check
()
src/b_multiple_choice.rs:329
Functionanswer_3_a
## Question 3 Consider this Rust code when answering question 3: ```notest fn mystery(n: u32) -> Vec<u32> { let mut seq = Vec::new(); for k in 1..n
src/b_multiple_choice.rs:139
Functionanswer_3_a_sanity_check
()
src/b_multiple_choice.rs:334
Functionanswer_3_b
### Question 3_B Consider changing the range `1..n`. Which of the following would _not_ cause the loop to execute one additional time: - a) `1..=n`
src/b_multiple_choice.rs:153
Functionanswer_3_b_sanity_check
()
src/b_multiple_choice.rs:339
Functionanswer_4_a
## Question 4 Consider this Rust code when answering question 4: ```notest fn sort(items: &mut [u32]); ``` ### Question 4_A The signature above ma
src/b_multiple_choice.rs:174
Functionanswer_4_a_sanity_check
()
src/b_multiple_choice.rs:344
Functionanswer_4_b
### Question 4_B How would this signature need to change to sort arbitrary data? - a) `fn sort<T>(items: &mut [T])` - b) `fn sort<T: Ord>(items: &mu
src/b_multiple_choice.rs:187
Functionanswer_4_b_sanity_check
()
src/b_multiple_choice.rs:349
Functionanswer_5
## Question 5 Which of the following tools is used to install Rust and manage Rust versions and components? - a) cargo - b) rustc - c) rustup - d) c
src/b_multiple_choice.rs:200
Functionanswer_5_sanity_check
()
src/b_multiple_choice.rs:354
Functionanswer_6
## Question 6 Consider this Rust code: ```notest struct Fraction { numerator: u32, denominator: u32, } impl From<u32> for Fraction { fn from(n: u32
src/b_multiple_choice.rs:236
Functionanswer_6_sanity_check
()
src/b_multiple_choice.rs:359
Functionanswer_7
## Question 7 Consider this Rust code: ```notest use std::num::ParseIntError; enum OutOfRangeError { TooLarge, TooSmall, NotEvenANumber, } impl Fr
src/b_multiple_choice.rs:279
Functionanswer_7_sanity_check
()
src/b_multiple_choice.rs:364
Functionbounded_absolute_values
This function takes an iterator of i32 values, calculates the absolute value of each, and throws away any values that are greater than 100. The remain
src/f_iterators.rs:20
Functionbounded_absolute_values_1
()
src/f_iterators.rs:94
Methodbuild
(self)
src/m_builder.rs:74
Methodcmp
(&self, other: &Self)
src/e_common_traits.rs:42
Functioncoding_no_ai_helpers
You are not allowed to use AI assisted coding tools like Github Copilot to complete this exam.
src/a_honor_code.rs:65
Functioncoding_no_copy
The coding portion of the exam allows access to books, and websites such as the Rust book, the standard library reference, and others _explicitly list
src/a_honor_code.rs:52
Functioncoding_no_external_deps
You are not allowed to use external dependencies from `crates.io` or elsewhere unless explicitly stated in the problem.
src/a_honor_code.rs:59
Functioncustom_mixed_1
()
src/h_advanced_traits.rs:342
Methoddefault
()
src/m_builder.rs:47
Functionemployee_from_string_success
()
src/e_common_traits.rs:91
Functionemployee_neq
()
src/e_common_traits.rs:134
Functionemployee_ord
()
src/e_common_traits.rs:116
Functionemployee_to_string_success
()
src/e_common_traits.rs:104
Methodenergy_density
()
src/h_advanced_traits.rs:58
Methodeq
(&self, other: &Self)
src/e_common_traits.rs:24
Functionexam_done_independently
This portion of the exam represents an honor code. By returning `true` from each of these functions you are attesting that you have followed the vario
src/a_honor_code.rs:13
Methodexperience
(self, experience: u32)
src/m_builder.rs:66
Functionextension_trait
()
src/i_extension_traits.rs:89
Functionfibonacci_1
()
src/f_iterators.rs:131
Functionfirst_n_even
(mut vals: impl Iterator<Item = u32>)
src/f_iterators.rs:36
Functionfirst_n_even_1
()
src/f_iterators.rs:105
Functionfirst_n_even_2
()
src/f_iterators.rs:113
Methodfrom
(e: Employee)
src/e_common_traits.rs:68
Methodfrom
(j: Joule)
src/h_advanced_traits.rs:19
Methodget
()
src/k_macros.rs:50
Functionhonor_code_respected
()
src/a_honor_code.rs:82
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/k_macros.rs:65
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/m_builder.rs:184
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/b_multiple_choice.rs:286
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/f_iterators.rs:72
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/e_common_traits.rs:76
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/i_extension_traits.rs:65
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/d_pattern_matching.rs:30
Functionhow_hard_was_this_section
This function is not graded. It is just for collecting feedback. On a scale from 0 - 255, with zero being extremely easy and 255 being extremely hard,
src/h_advanced_traits.rs:254
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/k_macros.rs:71
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/m_builder.rs:190
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/b_multiple_choice.rs:292
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/f_iterators.rs:78
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/e_common_traits.rs:82
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/i_extension_traits.rs:71
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/d_pattern_matching.rs:36
Functionhow_many_hours_did_you_spend_on_this_section
This function is not graded. It is just for collecting feedback. How much time (in hours) did you spend on this section of the exam?
src/h_advanced_traits.rs:260
Functioni_dont_know_count
(outcomes: Vec<Outcome>)
src/i_extension_traits.rs:28
Methodi_dont_know_count
(&self)
src/i_extension_traits.rs:52
Functionic_1
()
src/h_advanced_traits.rs:294
Functionimpl_get
()
src/k_macros.rs:92
Functionmap
()
src/k_macros.rs:80
Functionmatch_1
Complete the following functions using the pattern matching syntax. That includes the `match` statement of the `matches!()` macro, if you feel like ha
src/d_pattern_matching.rs:8
Functionmatch_2
Returns true if the first and last string in the vector start with `PBA`.
src/d_pattern_matching.rs:13
Functionmatch_3
Returns true if the first item in `input` is true.
src/d_pattern_matching.rs:18
Functionmatch_4
Returns true if the input is `Ok(x)` of some even `x`.
src/d_pattern_matching.rs:23
Functionmixed_1
()
src/h_advanced_traits.rs:334
Functionmultiple_choice_closed_book
The multiple choice portion of the exam must be completed without accessing the internet, books, or any other resources.
src/a_honor_code.rs:20
Functionmultiple_choice_no_run
The multiple choice portion of this exam has several questions asking for the output of a particular programs. It also has questions asking what chang
src/a_honor_code.rs:31
Methodname
(self, name: String)
src/m_builder.rs:58
Methodnew
(amount: u32)
src/h_advanced_traits.rs:92
Methodnext
(&mut self)
src/f_iterators.rs:64
Functionnuclear
()
src/h_advanced_traits.rs:279
Functionok_count
(outcomes: Vec<Outcome>)
src/i_extension_traits.rs:22
Methodok_count
(&self)
src/i_extension_traits.rs:49
Functionomni_1
()
src/h_advanced_traits.rs:315
Functionomni_80_energy
A function that returns the energy produced by the `OmniGenerator` with efficiency of 80%, when the fuel type is an even a mix of `Diesel` as `Lithium
src/h_advanced_traits.rs:212
Methodpartial_cmp
(&self, other: &Self)
src/e_common_traits.rs:36
Functionprocess_stuff
(input: impl Iterator<Item = T>)
src/i_extension_traits.rs:13
Methodprovide_energy
(&self, f: FuelContainer<F>)
src/h_advanced_traits.rs:136
Methodprovide_energy_ideal
Same as [`ProvideEnergy::provide_energy_with_efficiency`], but with an efficiency of 100. This method must be provided as it will be the same in all
src/h_advanced_traits.rs:128
Methodprovide_energy_with_efficiency
Convert the amount of fuel in `f` with an exact efficiency of `e`. NOTE: all efficiencies are interpreted as u8 values that can be at most 100, and r
src/h_advanced_traits.rs:121
Functionsimple_functions
()
src/i_extension_traits.rs:80
Functionsomething_went_wrong_count
(outcomes: Vec<Outcome>)
src/i_extension_traits.rs:25
Methodsomething_went_wrong_count
(&self)
src/i_extension_traits.rs:55
Functionsquare_whole_numbers
Return an "infinite" iterator that yields the squares of the whole numbers. For example, the first few values should be 0, 1, 4, 9, 16, 25, ... The i
src/f_iterators.rs:46
Functionsquare_whole_numbers_1
()
src/f_iterators.rs:123
Functionsum_of_squares
This portion of the exam tests your abilities to work with iterators and their functional-style methods. Throughout this portion of the test, you may
src/f_iterators.rs:13
Functionsum_of_squares_1
()
src/f_iterators.rs:87
next →1–100 of 110, ranked by callers