Python-Quiz 8 (mooc)

1
1
point # 0033003400340034003600321587046891908 Regarding the os library, the functions that can start the process execution program in the following options are: ‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪ ‪‪‪‪‪‪‬‪‬‪ ‬ ‬‪ os.start
()
os.run ()
os.process ()
os.system ()
the correct answer D
in addition to os.system (), there is no option other functions.

2
1
min # 0033003400340034003600321587046891914 on os.path shard, the following options are used to calculate the relative path is a function of: os.path.relpath
(path)
os.path.basename (path)
os.path.abspath (path)
os.path.normpath (path)
correct answer A as the
name suggests: os.path.relpath (path) is a relative path processing function.

3
1
point # 0033003400340034003600321587046891916 about the user experience, the following description is correct: the user
experience is objective and can rely on technology to achieve the
program is only a means, the ultimate program for human services, the user experience is very important
good product is not necessarily a good user experience, the key is functional and creative
user experience is not important, as long as the program can function
correctly answer B
a reminder of the progress bar, a never throw an exception Part of the order, a fast response, a beautiful icon, a suitable size are all user interface experience. In general, the user experience is everything that can enhance the user experience of the program.

4
1
minute # 0033003400340034003600321587046891918 The top-down design is mainly implemented by which of the following syntax elements? cyclic
structure
function
objects
Process The
correct answer B
function is a key element of top-down design, and program design is carried out layer by layer by defining functions and their parameters.

5
1
minute # 0033003400340034003600321587046891920 about Python os library, the following description is correct: os
library provides dozens of functions, limited functionality
os library provides a path operations, process management functions such as certain types of
os library is a third-party library, use the need to install the
os library only for Windows platform
the correct answer B
os library is one of the important Python standard library provides hundreds of functions function, cover with the operating system, file operation phase Many features. The os library is suitable for all operating systems.

6
1
point # 0033003400340034003600321587046891920 The following options are incorrect about the ecological description of calculation: ‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬ ‬‪‪ ‪‪‪‪‪ ‪ ‬ ‬‪ computing
ecosystem there is competition development, interdependence and rapid change of the characteristics of
a high-quality computing participation is necessary to safeguard the ecological needs of top-level design
calculation of control similar to the natural ecology, not a single organization or person ecological, formed a technology evolution path
computing ecosystem mainly in the form of open source projects for the organization
correct answer B
computing ecosystem with the development of competition, with Rapid change of interdependence and is characterized by top-level design does not exist between the open source project to the class nature "survival of the fittest" approach to the formation of technology evolution path.

7
1
point # 0033003400340034003600321587046891922 about computational thinking, the following description is correct: computational
thinking is logical evolution of thinking
computational thinking about design and construction, from the computer can exist
computational thinking is based on a computer model of thinking
computational thinking since ancient times there has been a
correct answer C
computational thinking is based on computer Before the advent of the computer, due to the lack of fast computing devices, the calculation reflected Dimensional model is mainly mathematical thinking, that is, to solve the problem through the formula. When fast computing devices appeared, computational thinking really took shape.

8
1
point # 0033003400340034003600321587046891923 following calculation describes the nature of thinking is correct: description
and implementation of
calculation and thinking
abstract and implementation of
abstraction and automation
correct answer D
nature of computational thinking is: abstraction and automation.

Abstract an operation process with the goal of being able to describe it step by step; and use the high-speed characteristics of computer operations to automate execution.

9
1
point # 0033003400340034003600321587046891924 difference on software products and programs, the following description is correct: from the
program features to the product of the cost of software products is small
software program features products = + user experience
software program is the software product
software product program features + = speed optimization
correct answer B
products not only need Function, it needs a better user experience. Often, products need to comprehensively consider technical functions and humanistic design, which stems from the commercial characteristics of the product. That is, commercial competition requires that products not only care about technical functions, but also care about users' ease of use and preferences.

10
1
min. # 0033003400340034003600321587046891925 on third-party libraries Python installation method, the following description of the error is: use
pip commands
using the integrated installation tool
to contact third-party libraries author to ask for the installation file
access UCI website to download the installation file
the correct answer C
Please do not contact the author to ask for third-party libraries, it's not obtain third party The reasonable model of the library.

34003600321587046925734
Robust input of English characters
Description
Obtain any possible input from the user and print out the English characters in it without error.

s = input()
for c in s:
    c = str(c)
    if 'z'>=c>='a' or 'Z'>=c>="A":
        print(c, end="")

03600321587046942389
Robust input of numbers
Description
Obtain a number entered by the user, which may be a floating point number or a complex number. If it is an integer, only the decimal form is accepted, and it can only be a number. Square the input numbers and output the result.

Claim
(1 ) regardless of what the user input, error-free program; (2)
If you make a mistake, please output "was entered incorrectly."

s = input()
try:
    if complex(s) == complex(eval(s)):
        print(eval(s)**2)
except:
    print("输入有误")
Published 29 original articles · Likes0 · Visits 474

Guess you like

Origin blog.csdn.net/qq_43771959/article/details/105568655