#Question 1

gene1= "ACGTATGC"
gene2= "ATG"

#Concatenation

combined = paste(gene1,gene2,sep ="")
combined
## [1] "ACGTATGCATG"

#Substring

gene1= "ACGTATGC"
substr(gene1,start = 2, stop = 5)
## [1] "CGTA"

#pattern exist (?)

gene1= "ACGTATGC"
gene2= "ATG"

grepl(gene2,gene1)
## [1] TRUE

#Index

matches= gregexpr(gene2,gene1)
matches=unlist(matches)
matches
## [1] 5

#Question 2

X= 14
Y = 7

#Add

add = X+Y
add
## [1] 21

#Substract

sub = X-Y
sub
## [1] 7

#Multiply

mult =X*Y
mult
## [1] 98

#Division

div= X/Y
div
## [1] 2

#Power

Power_X= X^3
Power_X
## [1] 2744
Power_Y= Y^3
Power_Y
## [1] 343

#Modulo

m1=X%%Y
m1
## [1] 0
m2=X%%3
m2
## [1] 2
m3=Y%%3
m3
## [1] 1