subject

Lab Assignment ObjectivesObtain and user input at runtime. Work with expressions, variables and assignments. Be able to construct arithmetic and Boolean Python expressions and assignment statements that correspond to informal specifications in English. Construct Python expressions and statements involving strings and Python string operators (including format specifiers) that correspond to lab specifications. Construct, starting from a specified expression set, Python expressions and statements involving lists/tuples and Python list/tuples operators and methods. Use Python Basic Data Types understanding what is meant by an object's type and value. Understand how the type determines the operators and methods that can be applied to the object. Be aware of how implicit and explicit type conversion between the basic Python data types are done. Import and use a module from the Python Standard Library. Understand the ApplicationObtain the family (last name) and student ID of the user at run time. Based on the user input, you program will create two int variables, my_id and n_let, into which you will store:my_id = The sum of the numbers in your College Generated student ID. (This is the sum of an 8-digit number; not to confuse it with your social security # or a password, which it is not).n_let = The number of letters in your family (last) name. In order to receive any credit for this assignment, these two values must match what I have for you on my class roster. Your program will compute some values based on these two numbers, so that each student will have a unique output. The Program SpecificationThe first thing your program needs to do is obtain valid user input for your family (last) name and your student ID. Next your program will generate the variables my_id and n_let. The expression set will be computed and the results displayed. Before exiting your program will display the current date and time. The following expressions assume that you have stored the calculation of the sum of the numbers of your student ID into the variable my_id, and the calculation of the number of letters in your last (family) name into the variable n_let. Your program should compute and display the results for the following expressions:expression1: my_id / 2expression 2: my_id % 2expression 3: 2 + 3 + ⦠+ n_letexpression 4: my_id + n_letexpression 5: abs(n_let â my_id)expression 6: (my_id) / (n_let + 1100)expression 7: (n_let % n_let) and (my_id * my_id)expression 8: 1 or (my_id / 0)expression 9: round(3.15, 1)Write a Python program that constructs an ordered collection data type whose elements consist of the Python expressions to realize the above expression set. Your program will compute and display the results of these nine expressions. Import and use the datetime (Links to an external site.) module to generate the date of your test run. Print this date in your run output. Input Error Checking: Validate all user input before computation. A valid student id contains only digits and is of length 8. A valid last name contains only characters and is of a minimum length 2, maximum length 15.Your program display should look something like this partial run (although the values will differ for each student):Enter your family name: StudentEnter your student ID: 12345678my_id is: 36n_let is: 7expression 1: 18.00...

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:00, appattuvilai1234
You install teamviewer on your workstation at home so that you can ac ess it when on the road. how can you be assured that unknown users cant access your computer through team viewer?
Answers: 2
image
Computers and Technology, 22.06.2019 11:30, neekWYB
Andrina writes letters that are regularly sent to hundreds of her company’s customers. because of this, she would like for the mail merge command to be in her quick access toolbar, and she wants it to be the first button on the left. what should andrina do to place the mail merge button there?
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, BreadOfTheBear
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, muncyemily
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
You know the right answer?
Lab Assignment ObjectivesObtain and user input at runtime. Work with expressions, variables and assi...

Questions in other subjects:

Konu
Mathematics, 03.06.2021 18:50