Integer together without doing proper type conversion

Assignment Help Basic Computer Science
Reference no: EM131289253

Python

Part 1: Create a function that takes a string as a parameter and attempts to open a file with the string that is passed.

Part 2: Create a function that takes a string as a parameter and attempts to use python's eval() function to evaluate that string as a mathematical expression

Part 3: Create a function that attempts to add a string and an integer together without doing proper type conversion.

Part 4: Create a function that attempts to convert the string 'test' to an int

Part 5: Write a main function that asks the user to select one of the functions above to call. Once the user has made their selection call the appropriate function and catch the error that is created. You should place all of these function calls in one try block. At the end of the try block you should catch at least one specific error that may be generated by each function. Note, it may be possible to for one function to generate more than one possible error. Have a final except block that will catch all errors not caught by your other except blocks.

Reference no: EM131289253

Questions Cloud

Explain job analysis by hr manager : Explain job analysis by HR manager
Wi-fi upstream vs downstream : On wireless WANs, downstream data transmission is typically faster than upstream transmission. What types of limitations does this bring to an office environment? Why do you think this should be a consideration in WAN configuration?
Compute the ideal number of clusters : Determine the ideal number of clusters. Choose random center points (centroids) for each cluster. Using a standard distance formula measure the distance from each data point to each center point.
How can networking be used to increase personal effectivenes : How can networking be used to increase personal or organizational effectiveness? How can it work against personal or organizational effectiveness? In your opinion, is business networking ethical? Why or why not?
Integer together without doing proper type conversion : Part 1: Create a function that takes a string as a parameter and attempts to open a file with the string that is passed. Part 2: Create a function that takes a string as a parameter and attempts to use python's eval() function to evaluate that stri..
Develop five major goals for information technology plan : Develop at least five major goals for the information technology strategic plan. Speculate on three positive organizational impacts of implementing the strategic plan. Justify your response.
Determine the power dissipated in r1 and the current in r2 : For the circuit shown below, using an appropriate analysis method, determine the power dissipated in R1.- Using a suitable analysis method, determine the current in R2.
How might you work to overcome your weaknesses : How will knowing your own personality traits help you to be a more effective health services manager ?
What is the session key kab : All arithmetic is done in GF(2^5) with P(x) = x^5+x^2+1 as an irreducible field polynomial. The primitive element for the Diffie-Hellman scheme is α = x^2. The private keys are KA = 3 and KB = 12. What is the session key kAB? Show all the step.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Describe three common governmental-political actions

Identify and describe three common governmental/political actions that significantlyinfluence a firm's ability to sell goods and services in a global marketplace.

  Does this sample pose a threat to groundwater in michigan

The State of Michigan Department of Environmental Quality has deter-mined that toxaphene concentrations in soil that exceed 60 pg/kg can pose a threat to underlying groundwater.

  Pros and con of having a dmz

Demilitarized Zone Is It Worth It? The pros and con of having a DMZ in a corporate setting. Why would you not have it?

  Rows and columns parameters

Write a complete Java method called get ScoreSheet that takes two ints as parameters (rows and columns) and constructs a 2-dimensional array of doubles (called scores) with a size based on the rows and columns parameters.

  What is the difference between a file and a database

What criteria are important in choosing a file organization?

  Outputs the monthly paycheck information

Write a program that calculates and outputs the monthly paycheckinformation for an employee, including all the amounts deductedfrom an employee's gross pay, and the net pay that is due to theemployee. The user of your program will know the employe..

  How you would manage the client''s involvement

describe how you would manage the client's involvement. Specifically, describe the positive aspects that you would repeat and the negative aspects that you would try to avoid.

  Describe the complexities of auditing a cloud computing

1. explain the role auditing plays in the context of achieving trustworthy systems. 2. explain the complexities of

  Three leadership positions

Imagine that a small city is trying to fill out three leadership positions (chairperson, vice-chair, and secretary) for a mayor's youth advisory council. There are 12 candidates that are available to choose from in the selection process. How many..

  What size repayment check

A loan of $18,445 was repaid at the end of 11 moths. What size repayment check (principal and interest_ was written, if an a8.8% annual rate of interest was changed?

  Calculate present value of future earnings

Why do we need to calculate the present value of future earnings? A company can invest $100,000 to develop a new system, or it can put that amount into a second best alternative investment getting 10 percent.

  What is the difference between production and test systems

What is the difference between production and test systems?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd