Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Polkadot-Blockchain-Academy/pba-qualifier-exam
/ functions
Functions
110 in github.com/Polkadot-Blockchain-Academy/pba-qualifier-exam
⨍
Functions
110
◇
Types & classes
29
↓ 12 callers
Function
sanity_check
(f: &dyn Fn() -> char)
src/b_multiple_choice.rs:300
↓ 6 callers
Function
has_honor
(f: &dyn Fn() -> bool)
src/a_honor_code.rs:74
Function
answer_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
Function
answer_1_a_sanity_check
()
src/b_multiple_choice.rs:309
Function
answer_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
Function
answer_1_b_sanity_check
()
src/b_multiple_choice.rs:314
Function
answer_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
Function
answer_1_c_sanity_check
()
src/b_multiple_choice.rs:319
Function
answer_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
Function
answer_1_d_sanity_check
()
src/b_multiple_choice.rs:324
Function
answer_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
Function
answer_2_sanity_check
()
src/b_multiple_choice.rs:329
Function
answer_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
Function
answer_3_a_sanity_check
()
src/b_multiple_choice.rs:334
Function
answer_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
Function
answer_3_b_sanity_check
()
src/b_multiple_choice.rs:339
Function
answer_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
Function
answer_4_a_sanity_check
()
src/b_multiple_choice.rs:344
Function
answer_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
Function
answer_4_b_sanity_check
()
src/b_multiple_choice.rs:349
Function
answer_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
Function
answer_5_sanity_check
()
src/b_multiple_choice.rs:354
Function
answer_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
Function
answer_6_sanity_check
()
src/b_multiple_choice.rs:359
Function
answer_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
Function
answer_7_sanity_check
()
src/b_multiple_choice.rs:364
Function
bounded_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
Function
bounded_absolute_values_1
()
src/f_iterators.rs:94
Method
build
(self)
src/m_builder.rs:74
Method
cmp
(&self, other: &Self)
src/e_common_traits.rs:42
Function
coding_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
Function
coding_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
Function
coding_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
Function
custom_mixed_1
()
src/h_advanced_traits.rs:342
Method
default
()
src/m_builder.rs:47
Function
employee_from_string_success
()
src/e_common_traits.rs:91
Function
employee_neq
()
src/e_common_traits.rs:134
Function
employee_ord
()
src/e_common_traits.rs:116
Function
employee_to_string_success
()
src/e_common_traits.rs:104
Method
energy_density
()
src/h_advanced_traits.rs:58
Method
eq
(&self, other: &Self)
src/e_common_traits.rs:24
Function
exam_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
Method
experience
(self, experience: u32)
src/m_builder.rs:66
Function
extension_trait
()
src/i_extension_traits.rs:89
Function
fibonacci_1
()
src/f_iterators.rs:131
Function
first_n_even
(mut vals: impl Iterator<Item = u32>)
src/f_iterators.rs:36
Function
first_n_even_1
()
src/f_iterators.rs:105
Function
first_n_even_2
()
src/f_iterators.rs:113
Method
from
(e: Employee)
src/e_common_traits.rs:68
Method
from
(j: Joule)
src/h_advanced_traits.rs:19
Method
get
()
src/k_macros.rs:50
Function
honor_code_respected
()
src/a_honor_code.rs:82
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
how_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
Function
i_dont_know_count
(outcomes: Vec<Outcome>)
src/i_extension_traits.rs:28
Method
i_dont_know_count
(&self)
src/i_extension_traits.rs:52
Function
ic_1
()
src/h_advanced_traits.rs:294
Function
impl_get
()
src/k_macros.rs:92
Function
map
()
src/k_macros.rs:80
Function
match_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
Function
match_2
Returns true if the first and last string in the vector start with `PBA`.
src/d_pattern_matching.rs:13
Function
match_3
Returns true if the first item in `input` is true.
src/d_pattern_matching.rs:18
Function
match_4
Returns true if the input is `Ok(x)` of some even `x`.
src/d_pattern_matching.rs:23
Function
mixed_1
()
src/h_advanced_traits.rs:334
Function
multiple_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
Function
multiple_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
Method
name
(self, name: String)
src/m_builder.rs:58
Method
new
(amount: u32)
src/h_advanced_traits.rs:92
Method
next
(&mut self)
src/f_iterators.rs:64
Function
nuclear
()
src/h_advanced_traits.rs:279
Function
ok_count
(outcomes: Vec<Outcome>)
src/i_extension_traits.rs:22
Method
ok_count
(&self)
src/i_extension_traits.rs:49
Function
omni_1
()
src/h_advanced_traits.rs:315
Function
omni_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
Method
partial_cmp
(&self, other: &Self)
src/e_common_traits.rs:36
Function
process_stuff
(input: impl Iterator<Item = T>)
src/i_extension_traits.rs:13
Method
provide_energy
(&self, f: FuelContainer<F>)
src/h_advanced_traits.rs:136
Method
provide_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
Method
provide_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
Function
simple_functions
()
src/i_extension_traits.rs:80
Function
something_went_wrong_count
(outcomes: Vec<Outcome>)
src/i_extension_traits.rs:25
Method
something_went_wrong_count
(&self)
src/i_extension_traits.rs:55
Function
square_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
Function
square_whole_numbers_1
()
src/f_iterators.rs:123
Function
sum_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
Function
sum_of_squares_1
()
src/f_iterators.rs:87
next →
1–100 of 110, ranked by callers