Python3 Engineer Certification Basic Exam-I tried to solve the mock exam-

About this article

I wrote an article about what I learned in the Python 3 Engineer Certification Basic Exam.

Exam outline

Exam Name: Python 3 Engineer Certification Basic Exam Number of questions: 40 questions Question format: Selection formula Test method: CBT (Computer Based Testing) format conducted on a computer Test time: 60 minutes Pass criteria: 70% correct answer Examination fee: General price 11,000 yen (tax included) Student discount price: 5,500 yen (tax included)

Question range The range of questions will be given in the following ratio from the main teaching material, O'Reilly Japan "Python Tutorial 3rd Edition".

Click here for details https://cbt.odyssey-com.co.jp/pythonic-exam.html

Practice exam questions

Question 1 Select the output result when the following program is executed.

terminal


import json
x = {'name':'yamada','data':[2,3,4]}
print(json.dumps(x))

JSON (JavaScript Object Notation) is a lightweight data exchange format. It is a format that is easy for humans to read and write, and easy for machines to parse and generate.

json.dumps () is a function that can encode Python objects into JSON format.

The execution result is as follows.

terminal


{"name": "yamada", "data": [2, 3, 4]}
reference

json --- JSON encoder and decoder https://docs.python.org/ja/3/library/json.html?highlight=json

Question 2 I want to execute the program and obtain the following execution results.

terminal


2017-09-11

Select the combination of codes to be written in (A) and (B) of the program below from the options.

terminal


from (A) import (B)
now = date.today()
print(now)

Correct answer: (A) datetime (B) date

reference

datetime --- Basic date and time types https://docs.python.org/ja/3/library/datetime.html

Q3 Select the correct output result when the following program is executed.

terminal


dic = 'diveintocode'
print(dic[1:10:2])

Output by skipping one from the 1st element to the 10th element (iveintocod) of the variable dic that contains the character string.

The execution result is as follows.

terminal


ienoo

Q4 Choose the appropriate build-in function dir ().

The dir () function is a built-in function that allows you to look up a list of defined functions and attributes.

terminal


dir()

terminal


['In',
 'Out',
 '_',
 '_5',
 '_6',
 '_7',
 '_8',
 '__',
 '___',
 '__builtin__',
 '__builtins__',
 '__doc__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 '_dh',
 '_i',
 '_i1',
 '_i10',
 '_i2',
 '_i3',
 '_i4',
 '_i5',
 '_i6',
 '_i7',
 '_i8',
 '_i9',
 '_ih',
 '_ii',
 '_iii',
 '_oh',
 '_sh',
 'dic',
 'exit',
 'get_ipython',
 'json',
 'quit',
 'sample_no',
 'sample_txt',
 'x']

Correct answer: You can see the name defined by the module.

Q5 Select the correct output result of executing the following program with the interpreter.

By using argv in the sys (system parameter) module You can pass arguments when running a Python program.

test.py


import sys
print(sys.argv)

Execute it with the following command.

terminal


$ python test.py test

The execution result is as follows.

terminal


['test.py', 'test']
reference

sys --- System parameters and functions https://docs.python.org/ja/3/library/sys.html#sys.argv

Q6 Select the output result when the following program is executed.

terminal


d = 'dive\ninto\ncode\t'
print(len(d))

Returns the length (number of elements) of the Python object.

The execution result is as follows.

terminal


15

Q7 In the interactive environment, select the file in which the history information is saved from the options.

Correct answer: .python_history

Q8 Select the output result when the following program is executed.

terminal


a = 2
b = 5

c = 3.0 + b, 5 * a

print(c)

Tuple elements are arbitrary Python objects. Tuples consisting of two or more elements consist of comma-separated expressions that represent the individual elements.

The execution result is as follows.

terminal


(8.0, 10)

Q9 Select the correct output result when the following program is executed.

terminal


d = 'xxxxDIVExxxxDIVExxxxDIVE'

print(d.replace('DIVE', 'CODE', 1))

Copies the string and returns all appearing substrings replaced with new. If the optional argument count is given, it replaces only the first count of old.

terminal


xxxxCODExxxxDIVExxxxDIVE

Q10 Select the output result when the following program is executed.

terminal


print(range(5))

Adds the number specified in step in order from the number specified in start, and creates an object that has consecutive numbers as elements up to the range that does not exceed the number specified in stop.

The execution result is as follows.

terminal


range(0, 5)

Q11 With python interpreter

terminal


D:\home\name\python

Select the correct input to output.

Correct answer: print (r'D: \ home \ name \ python')

reference

Raw string that ignores (disables) escape sequences in Python https://note.nkmk.me/python-raw-string-escape/

Q12

terminal


(1,3,5) < (1,2,3,4)

terminal


FALSE

Summary

Recommended Posts

Python3 Engineer Certification Basic Exam-I tried to solve the mock exam-
Take the Python3 Engineer Certification Basic Exam
How to pass and study the Python 3 Engineer Certification Basic Exam
How amateurs passed the Python 3 Engineer Certification Basic Exam
Impressions of taking the Python 3 Engineer Certification Basic Exam
A memorandum regarding the acquisition of the Python3 engineer certification basic exam
[Qualification] I studied Python from the basics to take the python3 engineer certification basic exam (examination record)
[Qualification] I studied Python from the basics to take the python3 engineer certification basic exam (study edition)
Programming beginner Python3 engineer certification basic exam record
Have passed the Python Engineer Certification Data Analysis Exam
I tried to solve the soma cube with python
How to study Python 3 engineer certification basic exam by Python beginner (passed in August 2020)
I tried to solve the problem with Python Vol.1
How an "amateur banker" passed the Python 3 Engineer Certification Basic Exam in a week
(Maybe) This is all you need to pass the Python 3 Engineer Certification Data Analysis Exam
I tried to solve the ant book beginner's edition with python
I passed the python engineer certification exam, so I released the study method
I tried to touch Python (basic syntax)
I tried to solve the first question of the University of Tokyo 2019 math entrance exam with python sympy
Try to solve the Python class inheritance problem
Python3 Engineer Certification Data Analysis Exam Self-made Questions
Try to solve the man-machine chart with Python
Python 3 Engineer Certification Data Analysis Exam Pre-Exam Learning
Former image processing engineer tried to solve Saizeriya's spot the difference with OpenCV
A story about a liberal arts programming amateur getting a Python 3 engineer certification basic exam
python beginners tried to predict the number of criminals
I tried to graph the packages installed in Python
Try to solve the programming challenge book with python3
I tried to summarize the basic form of GPLVM
Try to solve the internship assignment problem with Python
I tried to touch the CSV file with Python
NW engineer tried to aggregate addresses with python netaddr
[Python] I tried to graph the top 10 eyeshadow rankings
I want to write in Python! (3) Utilize the mock
[Introduction to Python] Basic usage of the library matplotlib
Python OpenCV tried to display the image in text.
I tried to summarize the string operations of Python
I tried to solve AOJ's number theory with Python
The 15th offline real-time I tried to solve the problem of how to write with python
How to write offline real time I tried to solve the problem of F02 with Python
Tohoku University 2020 First semester math exam (science) I tried to solve major questions 1 to 3 with Python
I tried to find the entropy of the image with python
I tried to simulate how the infection spreads with Python
[Python] I tried to visualize the follow relationship of Twitter
I tried to enumerate the differences between java and python
I tried changing the python script from 2.7.11 to 3.6.0 on windows10
I tried to divide the file into folders with Python
I tried "Implementing a genetic algorithm (GA) in python to solve the traveling salesman problem (TSP)"
The 17th Offline Real-time How to Solve Writing Problems in Python
I tried to display the video playback time (OpenCV: Python version)
I wanted to solve the ABC164 A ~ D problem with Python
I tried to solve the shift scheduling problem by various methods
Solve the smallest value in Python (equivalent to paiza rank D)
I tried to improve the efficiency of daily work with Python
Try to solve the shortest path with Python + NetworkX + social data
PhytoMine-I tried to get the genetic information of plants with Python
I tried to summarize all the Python plots used in the research by active science graduate students [Basic]
Leave the troublesome processing to Python
I tried to touch Python (installation)
In the python command python points to python3.8
How to get the Python version