Quiz 1.1: Basic SyntaxQ1: What is it stored in a project file ?What information can be stored on a Julia Project.toml file ? The name of all the dependencies libraries of the project (julia scripts) The exact version of the packages directly employed in the project (julia scripts) The ID of the packages directly used in the project (julia scripts) The minimum and maximum version of the packages directly used in the project (julia scripts) that are compatible with the project The ID of all the dependencies libraries of the project (julia scripts) The minimum and maximum version of all the dependencies libraries used in the project (julia scripts) that are compatible with the project The exact version of all the dependencies libraries employed in the project (julia scripts) The name of the packages directly used in the project (julia scripts) None of the (other) sentences is correct RESOLUTIONThe Project.toml file task is to indicate which is the set of packages that works with the given project, but not the concrete instance of the environment that is used in a project, that is the exact version of all directly and indirectly used packages. This is indeed the task of the Manifest.toml file.The correct answers are:"The name of the packages directly used in the project (julia scripts)""The ID of the packages directly used in the project (julia scripts)""The minimum and maximum version of the packages directly used in the project (julia scripts) that are compatible with the project"Q2: Syntax for commentsGiven the following sequence of commands (one for each line) run in an interactive session:# a = 1 a = 2 # hello a = # hello # 3 #= a = 4 #= a = 5 =# a = 6 =#Which statements are correct ? a is now 1 a is now 2 a is now 3 a is now 4 a is now 5 a is now 6 None of the (other) sentences is correct At least one of that commands raises a run-time error None of that commands raises a run-time error RESOLUTIONThe first command is a comment. On the second one, a is assigned the value 2. The third one raises a syntax error as the equal operator expects a right and a left hand side, while here the right hand side is all commented out. Finally lines 4 to the end is a big nested comment. It results that after that commands have been run, a remains assigned to 2. The correct answers are:"a is now 2""At least one of that commands raises a run-time error"Q3: Various syntax rulesGiven a file "Foo.jl" with the following code:function foo(x) println(x²) end a = [2,3] foo(a) foo.(a) foo(a[1])Which of the following statements are correct ? The output of foo(a) is [4,9] The output of foo.(a) is [4,9] The output of foo(a[1]) is 4 The output of foo(a[1]) is 9 Defining the function produces a run-time error because the body of the function is not indented Calling the function produces a run-time error because the body of the function is not indented Calling the function produces a run-time error because Unicode characters (²) are not allowed in Julia Calling the function produces a run-time error because x² is not defined None of the (other) sentences is correct RESOLUTIONFirst, Unicode characters are allowed (with very rare exceptions) and indentation doesn't matter in Julia. We would then be tempted to say hence that the broadcasted call foo.(a) produces [4,9] as output and foo(a[1]) produces 4. However the raising to the power is not obtained by using the Unicode ² character, but using the exponential operator, i.e. x^2. x² is just an other identifier name that has not been defined, so the function in all cases returns an error that x² is not defined. The correct answer is:"Calling the function produces a run-time error because x² is not defined" « 0101 - Basic syntax0101q - QUIZ 1.2 »Powered by Documenter.jl and the Julia Programming Language.SettingsThemeAutomatic (OS)documenter-lightdocumenter-darkcatppuccin-lattecatppuccin-frappecatppuccin-macchiatocatppuccin-mochaThis document was generated with Documenter.jl version 1.19.0 on Wednesday 30 September 2026. Using Julia version 1.12.7.