Skip to content

Instantly share code, notes, and snippets.

View waqaskhan409's full-sized avatar
🏠
Working from home

Waqas Khan waqaskhan409

🏠
Working from home
  • https://www.upwork.com/o/profiles/users/~013001ed37b9012a13/
View GitHub Profile
@mjohnsullivan
mjohnsullivan / icon_gradient.dart
Created November 25, 2019 22:09
Apply a color gradient to an icon in Flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
public class Question1 {
public static void main(String[] args) {
//Outputs for BunnyEar Functions
System.out.println(bunnyEars(0));
System.out.println(bunnyEars(1));
System.out.println(bunnyEars(2));
System.out.println(bunnyEars(234));
//Output for Equals Not Function
Q1. We have a number of bunnies and each bunny has two big floppy ears. We want to compute the total number of ears across all the bunnies recursively (without loops or multiplication).
bunnyEars(0) β†’ 0
bunnyEars(1) β†’ 2
bunnyEars(2) β†’ 4
bunnyEars(234) β†’ 468
________________________________________________________________________________________________________________________________________
package projects;
import java.util.*;
public class FloppyEars {
@Prince-Shaikh
Prince-Shaikh / Weak2.java
Created April 18, 2019 12:05
Solution to the 2nd Weakly Programming Task
public class Weak2 {
/*
Q1. We have a number of bunnies and each bunny has two big floppy ears.
We want to compute the total number of ears across all the bunnies
recursively (without loops or multiplication).
bunnyEars(0) β†’ 0
bunnyEars(1) β†’ 2
bunnyEars(2) β†’ 4