Top-Rated Free Essay
Preview

IT Level 3

Satisfactory Essays
1133 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
IT Level 3
Introduction
What is an event driven programming?
These events include user input events in user interfaces, these can be resolute by events that you apply such as mouse click, messages from programs. Event driven programming is the example used in the interfaces e.g. could be JavaScript these actions have a response to the user input.
Give example
Give screenshot

# Creating a text file
# Student Name: Aqib Ali
# Student ID:ALI14180648
# Date: 23/09/2014

found_coins = 20 magic_coins = 10 stolen_coins = 3 print(found_coins + magic_coins * 365 - stolen_coins * 52) stolen_coins = 2 print(found_coins + magic_coins * 365 - stolen_coins * 52) magic_coins = 13 print(found_coins + magic_coins * 365 - stolen_coins * 52)
3514
3566
4661

The program tells us how to multiply the numbers that are put above, e.g. found coins = 20, magic coins =10 and stolen coins=3 which are from lines 1-3 and line4 shows us a question which consists of those numbers. Line 5 shows us that stolen coins value is now 2 instead of 3 and line7 shows us that magic coins has also changed its value from 10 to 13
The program tells us how to multiply the numbers that are put above, e.g. found coins = 20, magic coins =10 and stolen coins =3 which are from lines 1-3 and line 4 shows us a question which consists of those numbers. Line 5 shows us that stolen coins value is now 2 instead of 3 and line7 shows us that magic coins has also changed its value from 10 to 13.

Event 2

spaces = ''*25
Line 2 - print('%s12 Butts Wynd' % spaces) print('%sTwinklebottom Heath' % spaces) print('%sWest Snoring' % spaces) print() print() print('Dear Sir') print() print('I wish to report that tiles are missing from the') print('outside toilet roof.') print('I think it was bad wind the other night that blew away.') print() print('Regards') print('Malcolm Dithering')

Line 15 - 12 Butts Wynd
Twinklebottom Heath
West Snoring
()
()
Dear Sir
()
I wish to report that tiles are missing from the outside toilet roof.
I think it was bad wind the other night that blew away.
()
Regards
Malcolm Dithering

The above program tells us that when you add a % in front of a word or sentence that you input it adds spaces in-between as you can see from line 2 and its completed version in line 15. Also when you add () it just prints the same exact thing like it has breaks in the sentence to inform you that you have moved the text under another text.

Event 3

favorite_sports = {'Ralph Williams':'Football', 'Michael Tippett':'Basketball','Edward Elgar':
Line 2 - 'Baseball','Rebecca Clarke':'Netball','Ethel Smyth':'Badminton','Frank Bridge':'Rugby'}
Line 3 - print(favorite_sports['Rebecca Clarke'])
Line 4 - del favorite_sports['Ethel Smyth'] print(favorite_sports) favorite_sports['Ralph Williams']='Ice Hockey' print(favorite_sports) Line 8 - Netball
{'Ralph Williams': 'Football', 'Michael Tippett': 'Basketball', 'Edward Elgar': 'Baseball', 'Rebecca Clarke': 'Netball', 'Frank Bridge': 'Rugby'}
{'Ralph Williams': 'Ice Hockey', 'Michael Tippett': 'Basketball', 'Edward Elgar': 'Baseball', 'Rebecca Clarke': 'Netball', 'Frank Bridge': 'Rugby'}

The program above tell us that the favourite sports for each person e.g. 'Ralph Williams':'Football', 'Michael Tippett':'Basketball','Edward Elgar': 'Baseball','Rebecca Clarke':'Netball','Ethel Smyth':'Badminton','Frank Bridge':'Rugby'. The program also tells us that it print Rebecca Clarkes favourite sport and delete Ethel Symths favourite sport and this can be shown in Line 2, Line 3 and Line 4 and it can be shown that it’s been added and deleted in Line 8 and the following lines after that.

Event 4

furniture='%s: a device for finding furniture in the dark' bodypart1 = 'Knee' bodypart2 = 'Shin' print(furniture%bodypart1) print(furniture%bodypart2)

Knee: a device for finding furniture in the dark
Shin: a device for finding furniture in the dark
The above program tells us that furniture = a device for finding furniture in the dark' and there are to parts to this and they are for body part 1 and body part 2 when you print both of them separately obviously e.g. of a print can be print (furniture%bodypart1)’ and he answer you get is Knee: a device for finding furniture in the dark.

Event 5

single_quote_str='He said, "Aren\'t can\'t shouldn\'t wouldn\'t."' print(single_quote_str) double_quote_str="he said, \"Aren't can't shouldn't wouldn't.\"" print(double_quote_str) Line 5 - He said, "Aren't can't shouldn't wouldn't."
Line 6 - He said, "Aren't can't shouldn't wouldn't."

The above program tells us that when you add a single quote where the wording is integrated by slashes and when you also print the same thing but without slashes in tem the answer you still get is the same as you can see in lines 5 and 6.

Event 6

wizard_list=['spider legs','toe of frog','eye of newt','bat wing','slug butter','snake dandruff'] print(wizard_list) wizard_list[2]='snail tongue' print(wizard_list) print(wizard_list[2:5])
Line 6 - wizard_list.append('bear burp') print(wizard_list) Line 8 - wizard_list.append('mandrake')
Line 9 - wizard_list.append('hemlock')
Line 10 - wizard_list.append('swamp gas') print(wizard_list) del wizard_list[5] print(wizard_list) del wizard_list[8] del wizard_list[7] del wizard_list[6] print(wizard_list) ['spider legs', 'toe of frog', 'eye of newt', 'bat wing', 'slug butter', 'snake dandruff']
['spider legs', 'toe of frog', 'snail tongue', 'bat wing', 'slug butter', 'snake dandruff']
['snail tongue', 'bat wing', 'slug butter']
['spider legs', 'toe of frog', 'snail tongue', 'bat wing', 'slug butter', 'snake dandruff', 'bear burp']
['spider legs', 'toe of frog', 'snail tongue', 'bat wing', 'slug butter', 'snake dandruff', 'bear burp', 'mandrake', 'hemlock', 'swamp gas']
['spider legs', 'toe of frog', 'snail tongue', 'bat wing', 'slug butter', 'bear burp', 'mandrake', 'hemlock', 'swamp gas']
['spider legs', 'toe of frog', 'snail tongue', 'bat wing', 'slug butter', 'bear burp']

The above program tells us that there is a wizard list and it consists of =['spider legs','toe of frog','eye of newt','bat wing','slug butter','snake dandruff'] which is in line 1 and that in line there is a change of substance because instead of it being ‘eye of newt’ its changed to ‘snail tongue’ and from then on the wizard list has changed and also in lines 6,8,9 and 10 the words , 'bear burp', 'mandrake', 'hemlock', 'swamp gas’ are added to the wizard list and as we get towards the end it tells us to delete wizard lists 8,7 and 6 and the last line in the whole code doesn’t include , 'mandrake', 'hemlock', 'swamp gas'.

Event 7

Line 1 - numbers=[1,2,3,4]
Line 2 - strings=['I','kicked','my','toe','and','it','is','sore'] mylist=[numbers,strings] Line 4 - print(mylist)

[[1, 2, 3, 4], ['I', 'kicked', 'my', 'toe', 'and', 'it', 'is', 'sore']]

The above program tells us that there are number which include 1,2,3 and 4 which you can see in line 1 and the strings in line 2 and they are both put together to form a sentence which can be shown in line 4 of the code.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    PT1420 Unit 8 Lab 8

    • 365 Words
    • 2 Pages

    Calculating a Running Total, page 201): Asks for input of a number 5 times then adds all numbers into one total sum, example 2,4,6,8,10 = 30…

    • 365 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    2. The program will display a series of screens prompting the user to enter the item name or number, price and quantity.…

    • 498 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Kama Deposits Paper

    • 571 Words
    • 3 Pages

    1. Prepare a bank deposit detail for a $2230.00 deposit. Use the information in questions A-D. Record your answers to the deposit slip provided.…

    • 571 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    This is event-driven because you are enable to save a document or file if you don’t click the save button. For example, if you create a presentation using Microsoft PowerPoint and you don’t click save, the file will be completely lost and you would have to start again, whereas if you click on the save button, which is normally at the top, the file will be saved on your computer at the destination you saved it at. This means you can open that same file and the presentation will be there with all you work on it. This is event-driven because you are clicking save and the Windows operating system will respond by saving your…

    • 342 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    PT1420 Unit 3 Labs

    • 270 Words
    • 2 Pages

    The Network Systems Administration degree is awarded after 90 credits and Nolan Owen has 70 left to take before graduation.…

    • 270 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Assignment

    • 1058 Words
    • 5 Pages

    1) Initialization: the variable is initialized 2) Test: the loop tests the variable by comparing it to the maximum value 3) Increment: to increase the value during each iteration the loop increments the counter variable by adding 1 to it.…

    • 1058 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    Pt1420 Unit 3 Essay

    • 966 Words
    • 4 Pages

    8- Collect how many questions your subject got correct on the multiplication worksheet. Collect how many times your subject pressed the spacebar in one minute every thirty seconds. Ask your subject to tell you a line from the song.…

    • 966 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    1. It keeps a count of the number of times you want to use the program to input data…

    • 351 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    The guided practice is a worksheet about budgeting. The worksheet is a grocery list. There is a list with groceries on it and there is two other sheets. The two other sheets are sheets that have different items on them. The other two worksheet you must find out the product price from the first worksheet. You will have to multiple product price by the number of products you are buying and total it out. The worksheet gives you a beginning balance. In this worksheet you must keep up with the running total until you are finish shopping for groceries. At the bottom of the worksheet there is two question about if you have enough money to buy all your groceries and how much do you have left or how much did you go over. These sheets was adapted from…

    • 250 Words
    • 1 Page
    Good Essays
  • Satisfactory Essays

    12. The STO→ button stores numbers to variables. To evaluate the expression23 4 a c b + −, press 9 STO→ ALPHA MATH ENTER to store the number 9 to A. Repeat this same process if B = 2 and C = 1, then evaluate the expression by…

    • 641 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Product and Candies

    • 826 Words
    • 4 Pages

    At the end of each round, count the number of candies on each side of the paper and keep track of the numbers in a data table.…

    • 826 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    EFT4 Task7 lesson plan

    • 1113 Words
    • 5 Pages

    1.3.8: Students will generate and solve two-step addition and subtraction problems and one-step multiplication problems based on practical situations. Model addition, subtraction, multiplication, and division in a variety of ways. Use mathematical vocabulary and symbols to describe multiplication and division.…

    • 1113 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Simulation Review

    • 538 Words
    • 3 Pages

    Unrestricted cash and Cash Equivalents /Cash Operation Expenses ÷ No. of Days in Period (365)…

    • 538 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Linux Directory Log

    • 472 Words
    • 3 Pages

    Directions: As you complete each of the following steps, keep track of what occurs at each point, including what you type, the output given, and if you experience any errors. Record the occurrences in the following matrix.…

    • 472 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Problem Set 3

    • 294 Words
    • 2 Pages

    Problem Set 3 is to be completed by 11:59 p.m. (ET) on Monday of Module/Week 6.…

    • 294 Words
    • 2 Pages
    Satisfactory Essays