Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Swift Basics Swift Types Recap: Swift Types

walter fernandez
walter fernandez
4,992 Points

. Step 1: Declare a c

I do not who to do this. Can someone help me please?

types.swift
// Enter your code below
let firstValue = 2
let secondValue = 1
let product = 2
let finalOutput = 2 * 1

2 Answers

Luc de Brouwer
seal-mask
.a{fill-rule:evenodd;}techdegree
Luc de Brouwer
Full Stack JavaScript Techdegree Student 17,939 Points

I'm not into Swift, but I guess in this case they are asking you to combine variables to output a result like a real calculator

So if I had to try it myself I'd be using the firstvalue & secondvalue to use them in something like this:

finalOutput = firstvalue * secondvalue or something like that

walter fernandez
walter fernandez
4,992 Points

thanks , but i tried already. I appreciate it.

Luc de Brouwer
seal-mask
.a{fill-rule:evenodd;}techdegree
Luc de Brouwer
Full Stack JavaScript Techdegree Student 17,939 Points

Have you tried using this? let firstValue = 1; let secondValue = 2; let product = firstValue * secondvalue;

However Step 2 I can't help you with, so far goes my Swift knowledge, I hope this helps you out a little bit more

walter fernandez
walter fernandez
4,992 Points

hi i did that pedro = "are you joking?" karina = "i am not stupid" pedro = "yes you are, and also you do not know anything of math" pedro = "how much is 123 % 12 ? " karina = i want to know how karina can say that answer because if i type karina = 123 % 12 it appears like a error.