Académique Documents
Professionnel Documents
Culture Documents
==============================================
Write a Python script that determines the highest day temp and highest
night temp of the following variables:
day1Temp = 78
day2Temp = 84
day3Temp = 98
night1Temp = 55
night2Temp = 45
night3Temp = 34
==============================================
Your output should look like this: (final area may have more numbers
after the decimal point)
==============================================
Submit your code copied and pasted into a document and include a
screen shot of it working on your own computer system.
==============================================
CYB 130 Week 2 Loops and Conditional Statements
User input can be obtained using the following statement and storing it
into a variable for future use:
The Python shell will wait for the user to input a number and then
continue forward with the next line in the script.
Write a Python script that accepts input until the user enters the
number 999 to stop. Determine whether the user input is either an
odd or even number. If it is an odd number, output: “You entered an
odd number!”. If it is an even number, output: “You entered an even
number!”. If the user quits by entering 999, output: “Thanks – Game
Over!”. Test your code for all three conditions. Remember 999 is an
odd number so make sure it doesn’t print – “You entered an odd
number!”
Submit the code copied and pasted into a document and include a
screen shot of it working on your own computer system.
==============================================
Write a Python script that asks the user to input an integer and then a
character. Use those values to print the character in the following
pattern:
rrrrr
rrrr
rrr
rr
rr
rrr
rrrr
rrrrr
The entry for this output was the integer 5 and the letter r. Your output
could use any integer or letter to print this pattern. Notice there is an
empty space between the two patterns, this should be included in your
code.
Submit your copied and pasted code into a document and include a
screen shot of it working on your own computer system.
==============================================
Submit your code copied and pasted into a document and include
multiple screen shots. One should be of the program executing on your
computer, the next one should be a screen shot showing me that the
picture downloaded to your system and the last one should be a screen
shot of the file downloaded to your system.
==============================================
CYB 130 Week 3 Python and HTML
Write a Python script that builds an HTML file of your own design. Add
an image tag into your HTML and link it to an image on your hard drive.
Make sure you store the image in the same directory as the html file,
otherwise it might not find the file.
Add code to open the newly created page in your web browser.
Submit the code copied and pasted into a document and include a
screen shot of it executing on your computer. Include a second screen
shot of the content in your web browser.
Submit your assignment using the Assignment Files tab.
==============================================
Zip your Python .py file and submit the.zip file so the code can be
validated.
Try different numbers, and state when it does work and when it does
not work. Explain why.
==============================================
Every turtle has a heading, body color, pen color, and X and Y position.
Yet, each turtle can have its own values for these fields.
Develop a script containing three new methods for the Turtle class as
follows:
Submit the copied and pasted code into a document and include a
screen shot of it working on your own computer system.
==============================================
==============================================
CYB 130 Week 5 Individual: Extracting Passwords
Linux systems keep user account information in the passwd file and the
encrypted password in the shadow file.
The passwd file containing account information might look like this:
smithj:x:1001:1001:John Smith:/home/smithj:/bin/bash
The shadow file containing password and account expiration
information for users might look like this:
smithj:KJDKKkkLLjjwlnttqoiybnm.:10063:0:99999:7:::
The fields in the shadow file are separated by a colon, with the first
field being the username and the second being the password.
Modify the bruteLogin function to use both the passwd and shadow
files. Assume your passwd and shadow files include two accounts.
Change the bruteLogin to extract the username and full name from the
passwd file and the password from the shadow file
Change the output to display the full name when confirming successful
FTP Login; e.g., “Myhostname FTP Logon Succeeded: John Smith/
KJDKKkkLLjjwlnttqoiybnm”
Zip your Python .py file and submit the.zip file so the code can be
validated.
==============================================