-2

Hello before my xcode wasn't showing anything on the sidebar or in the result area suddenly it started showing and i wrote a small piece of code and getting this error "Fatal error: attempt to evaluate editor placeholder: file MyPlayground.playground"

Following is my code

//: Playground - noun: a place where people can play
import UIKit
import PlaygroundSupport
func calcBmi(weight : Double, height : Double) -> Double{
    let BMI = weight/pow(height,2)
    return BMI
}
var bmiResutl = calcBmi(weight: 60, height: 1.83)
print(bmiResutl)
Daniel Espina
  • 614
  • 11
  • 24
omi
  • 17
  • 7

2 Answers2

0

Try reloading your file and see if that works for you. (Close xCode and load your file again)

Daniel Espina
  • 614
  • 11
  • 24
0

Using your code provides this result at my end: enter image description here

michael
  • 1
  • 1