Python script sample
- or -
Post a project like this1297
$45/hr
- Posted:
- Proposals: 7
- Remote
- #2980333
- Awarded
Description
Experience Level: Expert
I need two Python one-line script samples. They fave to behave in the following manner:
1. First one-line script have to display one thing when ran in IDLE interactive mode and display another thing when executed. For example if I type such script in IDLE interactive shell it would display "A" and when i execute the same one-line script the output will be "1".
2. Second one-line script must display something when executed, but must display something if run from an interactive IDLE shell.
If you know the answer please propose your one time fees. The answer must include an explanation why said python one-line scripts behave differently when executed vs when entered into interactive shell.
1. First one-line script have to display one thing when ran in IDLE interactive mode and display another thing when executed. For example if I type such script in IDLE interactive shell it would display "A" and when i execute the same one-line script the output will be "1".
2. Second one-line script must display something when executed, but must display something if run from an interactive IDLE shell.
If you know the answer please propose your one time fees. The answer must include an explanation why said python one-line scripts behave differently when executed vs when entered into interactive shell.
Allen Z.
100% (24)Projects Completed
17
Freelancers worked with
14
Projects awarded
28%
Last project
21 Dec 2023
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Good morning Allen,
About case 1: what do you mean with "I type such script in IDLE"? Is this a typo and in both cases you execute one-line script?
942603
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies