Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lab2 home work #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions waleedplay.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import UIKit
//Create two integer variables a and b
var a=10
var b=7
//Print the sum of these variable
var sum=a+b
print(sum)
//Create array of 6 elements
var arr=[0,1,2,3,4,5]
//Add the value 7 to the array
arr.append(6)
//Print the fourth element of the array
print(arr[3])
//Delete the second element of the array
arr.remove(at: 2)
//Create a set of 4 elements
var studentid : Set=[20,25,19,22]
//Print every element in the set
print(studentid)
//Create a string variable that holds your name
var myname="waleed"
//Print your name (the variable)
print(myname)
4 changes: 4 additions & 0 deletions waleedplay.playground/contents.xcplayground
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='ios' buildActiveScheme='true' importAppTypes='true'>
<timeline fileName='timeline.xctimeline'/>
</playground>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
11 changes: 11 additions & 0 deletions waleedplay.playground/timeline.xctimeline
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Timeline
version = "3.0">
<TimelineItems>
<LoggerValueHistoryTimelineItem
documentLocation = "file:///Users/macbook/Desktop/%D9%85%D8%AC%D9%84%D8%AF%20%D8%A8%D9%84%D8%A7%20%D8%B9%D9%86%D9%88%D8%A7%D9%86/projects/waleedplay.playground#CharacterRangeLen=17&amp;CharacterRangeLoc=317&amp;EndingColumnNumber=17&amp;EndingLineNumber=14&amp;StartingColumnNumber=0&amp;StartingLineNumber=14&amp;Timestamp=654444021.348065"
selectedRepresentationIndex = "0"
shouldTrackSuperviewWidth = "NO">
</LoggerValueHistoryTimelineItem>
</TimelineItems>
</Timeline>